Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem: gorelease workflow don't work #16

Merged
merged 1 commit into from
Aug 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 16 additions & 15 deletions .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
name: Release
# This workflow helps with creating releases.
# This job will only be triggered when a tag (vX.X.x) is pushed
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
- name: Install Go
uses: actions/[email protected]
with:
go-version: 1.16
- name: Unshallow
run: git fetch --prune --unshallow
- name: Create release
uses: goreleaser/[email protected]
submodules: true
- name: Set up Go
uses: actions/setup-go@v2
with:
args: release --rm-dist --release-notes ./RELEASE_CHANGELOG.md
go-version: 1.16.4
- name: release dry run
run: make release-dry-run
- name: setup release environment
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |-
echo 'GITHUB_TOKEN=${{secrets.GITHUB_TOKEN}}' > .release-env
- name: release publish
run: make release
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@ release:
-v `pwd`:/go/src/$(PACKAGE_NAME) \
-w /go/src/$(PACKAGE_NAME) \
troian/golang-cross:${GOLANG_CROSS_VERSION} \
release --rm-dist --skip-validate
release --rm-dist --skip-validate --release-notes ./RELEASE_CHANGELOG.md

.PHONY: release-dry-run release