mirror of
https://github.com/Alexandre1a/GoSH.git
synced 2026-03-09 19:19:46 +01:00
Changed the GitHub Build system to produce artifacts and build for macOS and Linux (arm64 and amd64)
This commit is contained in:
parent
99e69acba1
commit
bb4266bcba
36
.github/workflows/go.yml
vendored
36
.github/workflows/go.yml
vendored
@ -1,6 +1,3 @@
|
||||
# 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
|
||||
|
||||
on:
|
||||
@ -10,7 +7,6 @@ on:
|
||||
branches: ["main"]
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
@ -19,10 +15,40 @@ jobs:
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: '1.23.5'
|
||||
go-version: "1.23.5"
|
||||
|
||||
- name: Build
|
||||
run: go build -v ./...
|
||||
|
||||
- name: Test
|
||||
run: go test -v ./...
|
||||
|
||||
build-multiarch:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: "1.23.5"
|
||||
|
||||
- name: Build binaries for multiple architectures
|
||||
run: |
|
||||
mkdir -p dist
|
||||
|
||||
# Linux
|
||||
GOOS=linux GOARCH=amd64 go build -o dist/gosh-linux-amd64
|
||||
GOOS=linux GOARCH=arm64 go build -o dist/gosh-linux-arm64
|
||||
|
||||
# macOS
|
||||
GOOS=darwin GOARCH=amd64 go build -o dist/gosh-mac-amd64
|
||||
GOOS=darwin GOARCH=arm64 go build -o dist/gosh-mac-arm64
|
||||
|
||||
ls -lh dist/
|
||||
|
||||
- name: Upload binaries
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: gosh-binaries
|
||||
path: dist/
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user