Skip to content

v0.2.1

v0.2.1 #23

Workflow file for this run

name: Release Binaries
on:
release:
types: [created]
jobs:
commit_version_files:
name: Commit Version Files
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: main
fetch-tags: true
- name: Generate Version Files
run: |
go generate ./cmd/internal/version
- name: Commit Version Files
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "release: update version files"
branch: main
releases-matrix:
name: Release Go Binary
permissions:
contents: write
packages: write
runs-on: ubuntu-latest
strategy:
matrix:
# build and publish in parallel: linux/amd64, linux/arm64, darwin/amd64, darwin/arm64
goos: [linux, darwin]
goarch: [amd64, arm64]
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "^1.22.1"
- name: Generate Version Files
run: |
go generate ./cmd/internal/version
- name: Release for Linux
uses: wangyoucao577/go-release-action@v1
if: matrix.goos == 'linux'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
goversion: "1.22.1"
extra_files: LICENSE README.md
# This linux dependency is required for the clipboard package
pre_command: "apt-get update && apt-get -y install libx11-dev"
- name: Release for MacOS
uses: wangyoucao577/go-release-action@v1
if: matrix.goos == 'darwin'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
goversion: "1.22.1"
extra_files: LICENSE README.md