From 6265fd958e3c84049182117c21b646433d476dee Mon Sep 17 00:00:00 2001 From: pancho horrillo Date: Fri, 13 Dec 2019 22:49:08 +0100 Subject: [PATCH] chore: add GitHub Actions release workflow --- .github/workflows/release.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..f0e4460 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,30 @@ +name: Release + +on: + push: + tags: + - v*.*.* + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-go@v1 + with: + go-version: 1.13.5 + + - name: Select custom release notes + id: release-notes + run: | + RELNOTES="docs/release-notes/RELEASE-${GITHUB_REF#refs/tags/}.md" + [[ -f "$RELNOTES" ]] && echo ::set-output name=ARGS::--release-notes $RELNOTES || true + + - uses: goreleaser/goreleaser-action@v1 + with: + args: release --rm-dist ${{ steps.release-notes.outputs.ARGS }} + key: ${{ secrets.KEY }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}