Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go

name: Go
name: Go build and release

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:

Expand All @@ -19,14 +14,20 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
go-version: '1.23'

- name: Build
run: |
GOOS=linux GOARCH=amd64 go build -v -o pretend-linux-amd64
GOOS=darwin GOARCH=amd64 go build -v -o pretend-darwin-amd64
GOOS=darwin GOARCH=arm64 go build -v -o pretend-darwin-arm64


release:
runs-on: ubuntu-latest
needs: build
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v4
- name: Create Github Release and updaload assets
uses: softprops/action-gh-release@v2
with:
Expand Down