Skip to content

Merge pull request #38 from joemiller/joem/maintenance #1

Merge pull request #38 from joemiller/joem/maintenance

Merge pull request #38 from joemiller/joem/maintenance #1

Workflow file for this run

name: release
on:
push:
branches:
- main
paths:
- go.mod
- go.sum
- '**.go'
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- name: login to ghcr.io
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0
persist-credentials: false
- name: Set up Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5
with:
cache: false
- name: Run Unit Tests
run: |
make test
# setup qemu and buildx for cross-builds (arm64)
- name: Set up QEMU (for arm64 builds)
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3
with:
cache-binary: false
- name: Install GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
install-only: true
- name: run autotag to increment version
run: |
curl -sL https://git.io/autotag-install | sudo sh -s -- -b /usr/local/bin
autotag
- name: build and push release artifacts
env:
GITHUB_TOKEN: ${{ secrets.BREW_GITHUB_TOKEN }}
run: |
make deps
make release