Skip to content

Commit

Permalink
builds: add linux-arm64 binary to the npm package (#527)
Browse files Browse the repository at this point in the history
Signed-off-by: Muvaffak Onus <[email protected]>
  • Loading branch information
muvaf authored Dec 9, 2024
1 parent b0eb738 commit bf68b42
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:

- name: Build
run: |
((Get-Content -path main.go -Raw) -replace "local-build","${{ steps.create_release.outputs.current_tag }}") | Set-Content -Path main.go
((Get-Content -path main.go -Raw) -replace "local-build","${{ steps.create_release.outputs.current_tag }}") | Set-Content -Path main.go
mkdir bin
go build -ldflags="-s -w" -o bin/ios.exe
"${{ steps.create_release.outputs.current_tag }}" | Out-File -Encoding utf8NoBOM release_tag -NoNewline
Expand Down Expand Up @@ -122,9 +122,14 @@ jobs:
- name: Build
run: |
go install github.com/konoui/[email protected]
sed -i 's/version \= \"local-build\"/version = \"${{ env.release_tag }}\"/' main.go
mkdir bin
go build -ldflags="-s -w" -o bin/ios
GOARCH=arm64 go build -ldflags="-s -w" -o bin/ios-arm64
GOARCH=amd64 go build -ldflags="-s -w" -o bin/ios-amd64
lipo bin/ios-amd64 bin/ios-arm64 -create -output bin/ios
cp ./mac-bin/go-ios-mac.zip .
cp ./win-bin/go-ios-win.zip .
zip -j go-ios-linux.zip bin/ios
Expand All @@ -143,11 +148,13 @@ jobs:
mkdir ./npm_publish/dist/go-ios-darwin-amd64_darwin_amd64
mkdir ./npm_publish/dist/go-ios-darwin-arm64_darwin_arm64
mkdir ./npm_publish/dist/go-ios-linux-amd64_linux_amd64
mkdir ./npm_publish/dist/go-ios-linux-arm64_linux_arm64
mkdir ./npm_publish/dist/go-ios-windows-amd64_windows_amd64
cp ./mac-bin/ios ./npm_publish/dist/go-ios-darwin-amd64_darwin_amd64/ios
cp ./mac-bin/ios ./npm_publish/dist/go-ios-darwin-arm64_darwin_arm64/ios
cp ./win-bin/ios.exe ./npm_publish/dist/go-ios-windows-amd64_windows_amd64/ios.exe
cp ./bin/ios ./npm_publish/dist/go-ios-linux-amd64_linux_amd64/ios
cp ./bin/ios ./npm_publish/dist/go-ios-linux-arm64_linux_arm64/ios
echo "//registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN" >> ~/.npmrc
cd npm_publish
sed -i 's/\"local-build\"/\"${{ env.release_tag }}\"/' package.json
Expand Down

0 comments on commit bf68b42

Please sign in to comment.