Skip to content

Commit

Permalink
tlock: ci: Use goreleaser to handle building binaries on release
Browse files Browse the repository at this point in the history
  • Loading branch information
eklairs committed May 12, 2024
1 parent 81e3dc8 commit 1f5048c
Showing 1 changed file with 22 additions and 27 deletions.
49 changes: 22 additions & 27 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,32 @@
name: Release TLock

on:
release:
types: [created]
push:
tags:
- '*'

permissions:
contents: write
packages: write
contents: write

jobs:
releases-matrix:
name: Release TLock
goreleaser:
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, windows, darwin]
goarch: ["386", amd64, arm64]
exclude:
- goarch: "386"
goos: darwin
- goarch: arm64
goos: windows
steps:
- uses: actions/checkout@v4
with:
-
name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- uses: wangyoucao577/go-release-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
project_path: "./tlock"
binary_name: "tlock"
ldflags: "-X github.com/eklairs/tlock/tlock-internal/constants.VERSION=${{ github.ref_name }} -w -s"
md5sum: false
sha256sum: true
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v4

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: '~> v1'
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 1f5048c

Please sign in to comment.