Skip to content

Commit

Permalink
imp(ci): use goreleaser Github Action (#720)
Browse files Browse the repository at this point in the history
* imp(ci): use goreleaser Github Action

* fix yaml
  • Loading branch information
ranupthestairs committed Jun 27, 2022
1 parent 4ca8fbf commit 30305c9
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 69 deletions.
27 changes: 15 additions & 12 deletions .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,28 @@ on:
push:
tags:
- "v*.*.*"
permissions:
contents: read

jobs:
goreleaser:
permissions:
contents: write # for goreleaser/goreleaser-action to create a GitHub release
runs-on: ubuntu-latest
environment: release
steps:
- uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
- name: Set up Go
fetch-depth: 0
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.18
check-latest: true
- name: release dry run
run: make release-dry-run
- name: setup release environment
- name: Unshallow
run: git fetch --prune --unshallow
- name: Create release
uses: goreleaser/goreleaser-action@v3
with:
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |-
echo 'GITHUB_TOKEN=${{secrets.GITHUB_TOKEN}}' > .release-env
- name: release publish
run: make release
17 changes: 0 additions & 17 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,6 @@ jobs:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main'"

install-tparse:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.18
check-latest: true
- name: Display Go Version
run: go version
- name: Install tparse
run: |
export GO111MODULE="on" && go get github.com/mfridman/tparse@latest
- uses: actions/cache@v3
with:
path: ~/go/bin
key: ${{ runner.os }}-go-tparse-binary

test-unit-cover:
runs-on: ubuntu-latest
steps:
Expand Down
37 changes: 0 additions & 37 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -566,43 +566,6 @@ localnet-show-logstream:

.PHONY: build-docker-local-evmos localnet-start localnet-stop

###############################################################################
### Releasing ###
###############################################################################

PACKAGE_NAME:=github.com/evmos/evmos
GOLANG_CROSS_VERSION = v1.18
GOPATH ?= '$(HOME)/go'
release-dry-run:
docker run \
--rm \
--privileged \
-e CGO_ENABLED=1 \
-v /var/run/docker.sock:/var/run/docker.sock \
-v `pwd`:/go/src/$(PACKAGE_NAME) \
-v ${GOPATH}/pkg:/go/pkg \
-w /go/src/$(PACKAGE_NAME) \
ghcr.io/troian/golang-cross:${GOLANG_CROSS_VERSION} \
--rm-dist --skip-validate --skip-publish --snapshot

release:
@if [ ! -f ".release-env" ]; then \
echo "\033[91m.release-env is required for release\033[0m";\
exit 1;\
fi
docker run \
--rm \
--privileged \
-e CGO_ENABLED=1 \
--env-file .release-env \
-v /var/run/docker.sock:/var/run/docker.sock \
-v `pwd`:/go/src/$(PACKAGE_NAME) \
-w /go/src/$(PACKAGE_NAME) \
ghcr.io/troian/golang-cross:${GOLANG_CROSS_VERSION} \
release --rm-dist --skip-validate

.PHONY: release-dry-run release

###############################################################################
### Compile Solidity Contracts ###
###############################################################################
Expand Down
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ parent:
<h1> Evmos </h1>
</div>

<!-- TODO: add banner -->
<!-- ![banner](docs/ethermint.jpg) -->

<div align="center">
<a href="https://github.com/evmos/evmos/releases/latest">
<img alt="Version" src="https://img.shields.io/github/tag/tharsis/evmos.svg" />
Expand Down

0 comments on commit 30305c9

Please sign in to comment.