This commit is contained in:
parent
434d1f07d9
commit
d395d76d04
3 changed files with 80 additions and 21 deletions
50
.forgejo/workflows/release.yml
Normal file
50
.forgejo/workflows/release.yml
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
name: Release Builds
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-22.04
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
goos: [linux, darwin, windows]
|
||||
exclude:
|
||||
- os: ubuntu-latest
|
||||
goos: darwin
|
||||
- os: ubuntu-latest
|
||||
goos: windows
|
||||
- os: macos-latest
|
||||
goos: linux
|
||||
- os: macos-latest
|
||||
goos: windows
|
||||
- os: windows-latest
|
||||
goos: linux
|
||||
- os: windows-latest
|
||||
goos: darwin
|
||||
|
||||
steps:
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '1.24'
|
||||
|
||||
- name: Get dependencies
|
||||
run: go mod tidy
|
||||
|
||||
- name: Build for ${{ matrix.goos }}
|
||||
run: |
|
||||
GOOS=${{ matrix.goos }} GOARCH=amd64 go build -o workctl-${{ matrix.goos }} .
|
||||
ls -la
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: workctl-${{ matrix.goos }}
|
||||
path: workctl-${{ matrix.goos }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue