Skip to content

Commit

Permalink
infra(workflows): add release
Browse files Browse the repository at this point in the history
  • Loading branch information
sharpvik committed Jan 27, 2023
1 parent 697964f commit f3b575c
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/publish-to-aur.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ jobs:
publish-to-aur:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: "Publish AUR package"
uses: KSXGitHub/github-actions-deploy-aur@v2.2.5
with:
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: release

on:
push:
branches:
- main
tags:
- "*"

permissions:
contents: write

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Fetch all tags
run: git fetch --force --tags
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '^1.19'
check-latest: true
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
distribution: goreleaser
version: ${{ env.GITHUB_REF_NAME }}
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.PUBLISHER_TOKEN }}

31 changes: 31 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
builds:
- binary: sema
goos:
- windows
- darwin
- linux
goarch:
- amd64
- arm64
env:
- CGO_ENABLED=0
- GO111MODULES=on

release:
prerelease: auto

universal_binaries:
- replace: true

brews:
- name: sema
homepage: https://github.com/sharpvik/sema
tap:
owner: sharpvik
name: homebrew-sema
commit_author:
name: Viktor A. Rozenko Voitenko
email: sharp.vik@gmail.com

checksum:
name_template: "checksums.txt"

0 comments on commit f3b575c

Please sign in to comment.