ci: Migrate CircleCI automation to github actions. (#62) #8
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: goreleaser | |
on: | |
push: | |
tags: | |
- 'v1.**' | |
permissions: | |
contents: write | |
# packages: write | |
# issues: write | |
jobs: | |
goreleaser: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- run: git fetch --force --tags | |
- name: go dependency | |
uses: actions/setup-go@v3 | |
with: | |
go-version-file: 'go.mod' | |
- name: Setup QEMU (docker multi-arch dependency) | |
uses: docker/setup-qemu-action@v2 | |
- name: Setup Docker Buildx (docker multi-arch dependency) | |
uses: docker/setup-buildx-action@v2 | |
- name: dockerhub-login | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- uses: goreleaser/goreleaser-action@v4 | |
with: | |
distribution: goreleaser | |
version: latest | |
args: release --clean | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# After a release, generate a PR to publish docs. | |
publish-docs-trigger: | |
name: Trigger a PR to update documentation. | |
needs: goreleaser | |
uses: ./.github/workflows/docs-pr.yml |