Skip to content

Commit

Permalink
Add release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mariuswilms committed Feb 13, 2025
1 parent c9576cd commit 1d9ca19
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Release

on:
push:
tags:
- 'v*'

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'

- name: Run Tests
run: go test -v ./...

release:
needs: test
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'

- name: Build for Linux
run: |
GOOS=linux GOARCH=amd64 go build -o tobey-linux-amd64
GOOS=linux GOARCH=arm64 go build -o tobey-linux-arm64
- name: Build for macOS
run: |
GOOS=darwin GOARCH=amd64 go build -o tobey-darwin-amd64
GOOS=darwin GOARCH=arm64 go build -o tobey-darwin-arm64
- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: |
tobey-linux-amd64
tobey-linux-arm64
tobey-darwin-amd64
tobey-darwin-arm64
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 1d9ca19

Please sign in to comment.