Skip to content

Commit

Permalink
CI: publish build artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
lostdusty authored Jan 26, 2024
1 parent 23f8d9e commit caa42cf
Showing 1 changed file with 29 additions and 11 deletions.
40 changes: 29 additions & 11 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,35 @@
on: [push, pull_request]
name: Build
# .github/workflows/release.yaml

on:
push:
release:
types: [created]

permissions:
contents: write
packages: write

jobs:
test-nocache:
releases-matrix:
name: Release Cobalt Binary
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ 1.21.x ]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
goos: [linux, windows, darwin]
goarch: ["386", amd64, arm64]
exclude:
- goarch: "386"
goos: darwin
- goarch: arm64
goos: windows
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
- uses: wangyoucao577/go-release-action@v1
with:
go-version: ${{ matrix.go-version }}
cache: false
- run: go build -o "${{ matrix.os }}" ./...

github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
binary_name: "cobalt-${{ matrix.goos }}-${{ matrix.goarch }}"
ldflags: -s -w
pre_command: "go install github.com/tc-hib/go-winres@latest && go-winres make"
asset_name: "cobalt-${{ matrix.goos }}-${{ matrix.goarch }}"

0 comments on commit caa42cf

Please sign in to comment.