Skip to content

Commit

Permalink
ship presets
Browse files Browse the repository at this point in the history
  • Loading branch information
missdeer committed Nov 9, 2023
1 parent f096c18 commit 68b6a91
Showing 1 changed file with 15 additions and 23 deletions.
38 changes: 15 additions & 23 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,36 +19,29 @@ jobs:
env GOOS=darwin GOARCH=arm64 go build -o getnovel-arm64 -ldflags="-s -w" .
mkdir darwin-universal
lipo -create -output darwin-universal/getnovel getnovel-amd64 getnovel-arm64
- name: Upload artifact getnovel-darwin-amd64
uses: actions/[email protected]
with:
name: getnovel-darwin-universal
path: darwin-universal

Build-on-Linux:
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.21
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Build
run: |
cp -r preset darwin-universal/
env GOOS=linux GOARCH=amd64 go build -o linux-amd64/getnovel -ldflags="-s -w" .
cp -r preset linux-amd64/
env GOOS=linux GOARCH=arm go build -o linux-arm/getnovel -ldflags="-s -w" .
cp -r preset linux-arm/
env GOOS=linux GOARCH=arm64 go build -o linux-arm64/getnovel -ldflags="-s -w" .
cp -r preset linux-arm64/
env GOOS=windows GOARCH=amd64 go build -o windows-amd64/getnovel.exe -ldflags="-s -w" .
cp -r preset windows-amd64/
env GOOS=freebsd GOARCH=amd64 go build -o freebsd-amd64/getnovel -ldflags="-s -w" .
cp -r preset freebsd-amd64/
env GOOS=openbsd GOARCH=amd64 go build -o openbsd-amd64/getnovel -ldflags="-s -w" .
env GOOS=netbsd GOARCH=amd64 go build -o netbsd-amd64/getnovel -ldflags="-s -w" .
cp -r preset openbsd-amd64/
env GOOS=nebsd GOARCH=amd64 go build -o netbsd-amd64/getnovel -ldflags="-s -w" .
cp -r preset netbsd-amd64/
env GOOS=dragonfly GOARCH=amd64 go build -o dragonfly-amd64/getnovel -ldflags="-s -w" .
cp -r preset dragonfly-amd64/
- name: Upload artifact getnovel-darwin-amd64
uses: actions/[email protected]
with:
name: getnovel-darwin-universal

- name: Upload artifact getnovel-linux-amd64
uses: actions/[email protected]
with:
Expand Down Expand Up @@ -89,7 +82,6 @@ jobs:
uses: actions/[email protected]
with:
name: getnovel-freebsd-amd64
path: freebsd-amd64

- name: Upload artifact getnovel-windows-amd64
uses: actions/[email protected]
Expand Down

0 comments on commit 68b6a91

Please sign in to comment.