Skip to content

Commit

Permalink
Client release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
BastienClement committed Nov 4, 2023
1 parent c917cf6 commit 33e40e8
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Release
on:
push:
tags:
- '*'

permissions:
contents: write

jobs:
deploy:
name: Build and release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.21.x'

- name: Build
env:
CGO_ENABLED: "0"
GO111MODULE: "on"
run: |
GOOS=linux GOARCH=amd64 go build -trimpath -ldflags="-s -w -X main.version=${{ github.ref }} -X main.commit=${{ github.sha }}" -o bin/alfred-linux-amd64 ./client
GOOS=darwin GOARCH=amd64 go build -trimpath -ldflags="-s -w -X main.version=${{ github.ref }} -X main.commit=${{ github.sha }}" -o bin/alfred-darwin-amd64 ./client
GOOS=darwin GOARCH=arm64 go build -trimpath -ldflags="-s -w -X main.version=${{ github.ref }} -X main.commit=${{ github.sha }}" -o bin/alfred-darwin-arm64 ./client
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
file: bin/alfred-*
file_glob: true
overwrite: true
promote: true

0 comments on commit 33e40e8

Please sign in to comment.