55 lines
1.2 KiB
YAML
55 lines
1.2 KiB
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@v2
|
|
with:
|
|
go-version: '^1.14.3'
|
|
|
|
- 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: azure/docker-login@v1
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
|
|
|
# - name: Import GPG key
|
|
# id: import_gpg
|
|
# uses: crazy-max/ghaction-import-gpg@v2
|
|
# env:
|
|
# GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
|
|
|
|
- name: Load GPG private key
|
|
run: |
|
|
echo "$GPG_PRIVATE_KEY" | gpg --import
|
|
env:
|
|
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
|
|
|
|
- uses: goreleaser/goreleaser-action@v2
|
|
with:
|
|
args: release --rm-dist ${{ steps.release-notes.outputs.ARGS }}
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
GO_VERSION: 1.14.4
|
|
|
|
- name: Clear ~/.gnupg
|
|
run: |
|
|
rm -rf ~/.gnupg
|