Files
kapow/.github/workflows/release.yml
pancho horrillo 929d6bb8ba chore: disable GPG handling for now
Co-authored-by: Roberto Abdelkader Martínez Pérez <robertomartinezp@gmail.com>
2020-12-18 11:57:14 +01:00

44 lines
1.1 KiB
YAML

name: Release
on:
push:
tags:
- v*.*.*
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Load Go version
id: go-version
run: |
echo ::set-output name=go-version::$(sed 's/^.*://' .github/go/Dockerfile)
- uses: actions/setup-go@v2
with:
go-version: ${{ steps.go-version.outputs.go-version }}
- 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
- name: Docker Login
run: |
username="${{ secrets.DOCKERHUB_USERNAME }}"
password="${{ secrets.DOCKERHUB_PASSWORD }}"
echo "$password" | docker login --username "$username" --password-stdin
- uses: goreleaser/goreleaser-action@v2
with:
args: release --rm-dist ${{ steps.release-notes.outputs.ARGS }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}