Skip to content

Merge pull request #20 from KristofferRisa/chore/release-polish #7

Merge pull request #20 from KristofferRisa/chore/release-polish

Merge pull request #20 from KristofferRisa/chore/release-polish #7

Workflow file for this run

name: Release
on:
push:
tags:
- "v*.*.*"
permissions:
contents: write
jobs:
test:
name: Test before release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v7
with:
go-version: "1.23.x"
cache: true
- name: Run tests
run: go test -v ./...
release:
name: Create Release
needs: test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v7
with:
go-version: "1.23.x"
cache: true
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v7
with:
distribution: goreleaser
version: "~> v2"
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# PAT with write access to KristofferRisa/homebrew-powerctl, so
# GoReleaser can push the updated cask to the tap.
HOMEBREW_TAP_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}