Added release workflow

This commit is contained in:
Pijus Kamandulis 2024-02-26 22:41:33 +02:00
parent 1158f93102
commit d426dc23c0
2 changed files with 65 additions and 0 deletions

30
.github/workflows/release.yml vendored Normal file
View File

@ -0,0 +1,30 @@
name: goreleaser
on:
push:
tags:
- '*'
permissions:
contents: write
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.21.6
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: ${{ env.GITHUB_REF_NAME }}
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.PUBLISHER_TOKEN }}

35
.goreleaser.yaml Normal file
View File

@ -0,0 +1,35 @@
builds:
- binary: cosmium
goos:
- darwin
- linux
- windows
goarch:
- amd64
- arm64
env:
- CGO_ENABLED=0
ignore:
- goos: linux
goarch: arm64
- goos: windows
goarch: arm64
release:
prerelease: auto
universal_binaries:
- replace: true
brews:
- name: cosmium
homepage: 'https://github.com/pikami/cosmium'
repository:
owner: pikami
name: homebrew-pikami
commit_author:
name: pikami
email: git@pikami.org
checksum:
name_template: 'checksums.txt'