Files
kapow/.github/workflows/release.yml
pancho horrillo 6f3cb233a9 chore(workflows): bump actions/checkout to v2
actions/checkout v2 clones shallow repos by default.
I've set the fetch-depth to 0 to prevent this, because goreleaser requires the
full history available locally in order to generate the release notes
automatically.
2020-02-29 13:20:06 +01:00

34 lines
714 B
YAML

name: Release
on:
push:
tags:
- v*.*.*
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-go@v1
with:
go-version: 1.14
- 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 }}