This will enable the goreleaser action to actually push to docker hub. See https://github.com/marketplace/actions/docker-login
39 lines
868 B
YAML
39 lines
868 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@v2
|
|
with:
|
|
go-version: '^1.14.2'
|
|
|
|
- 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.REGISTRY_USERNAME }}
|
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
|
|
|
- uses: goreleaser/goreleaser-action@v1
|
|
with:
|
|
args: release --rm-dist ${{ steps.release-notes.outputs.ARGS }}
|
|
key: ${{ secrets.KEY }}
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|