ci: fix goreleaser (#708)
* testing goreleaser * removed arm64 building instructions * CGO changed * ci: reverted releaser changes, back to troian/golang-cross * using snapshot to test the release ci * testing ci code removed
This commit is contained in:
@@ -1,38 +1,27 @@
|
||||
# This workflow helps with creating releases.
|
||||
# This job will only be triggered when a tag (vX.X.x) is pushed
|
||||
name: Release
|
||||
name: goreleaser
|
||||
|
||||
on:
|
||||
push:
|
||||
# Sequence of patterns matched against refs/tags
|
||||
tags:
|
||||
- "v[0-9]+.[0-9]+.[0-9]+" # Push events to matching v*, i.e. v1.0, v20.15.10
|
||||
|
||||
- "v*.*.*"
|
||||
jobs:
|
||||
release:
|
||||
goreleaser:
|
||||
runs-on: ubuntu-latest
|
||||
environment: release
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.5
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-go@v2.1.4
|
||||
submodules: true
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.17
|
||||
- name: Set Env
|
||||
run: echo "TM_VERSION=$(go list -m github.com/tendermint/tendermint | sed 's:.* ::')" >> $GITHUB_ENV
|
||||
- name: Build
|
||||
uses: goreleaser/goreleaser-action@v2.8.0
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
with:
|
||||
version: latest
|
||||
args: build --rm-dist --skip-validate # skip validate skips initial sanity checks in order to be able to fully run
|
||||
env:
|
||||
TM_VERSION: ${{ env.TM_VERSION }}
|
||||
- name: Release
|
||||
uses: goreleaser/goreleaser-action@v2.8.0
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
with:
|
||||
version: latest
|
||||
args: release --rm-dist --release-notes ./RELEASE_NOTES.md
|
||||
- name: release dry run
|
||||
run: make release-dry-run
|
||||
- name: setup release environment
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
TM_VERSION: ${{ env.TM_VERSION }}
|
||||
run: |-
|
||||
echo 'GITHUB_TOKEN=${{secrets.GITHUB_TOKEN}}' > .release-env
|
||||
- name: release publish
|
||||
run: make release
|
||||
Reference in New Issue
Block a user