Skip to content

Commit

Permalink
Update build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Labfox authored Aug 13, 2024
1 parent 500fe3c commit ffd3209
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ jobs:
go-version: '1.21'

- name: Build
run: GOOS=linux GOARCH=amd64 CGO_ENABLED=1 go build -v -buildmode=c-shared -ldflags=-s -o ./whatsfly/dependencies/whatsmeow/static/whatsmeow-linux-amd64.so ./whatsfly/dependencies/main.go
run: |
GOOS=linux GOARCH=amd64 CGO_ENABLED=1 go build -v -buildmode=c-shared -ldflags=-s -o ./whatsfly/dependencies/whatsmeow/static/whatsmeow-linux-amd64.so ./whatsfly/dependencies/main.go
cp ./whatsfly/dependencies/whatsmeow/static/whatsmeow-linux-amd64.so ./whatsfly/dependencies/whatsmeow/static/whatsmeow-linux-amd64-$GITHUB_SHA.so
- name: Commit changes
run: |
Expand All @@ -41,8 +43,13 @@ jobs:
go-version: '1.21'

- name: Build
env:
GOOS: windows
GOARCH: amd64
CGO_ENABLED: 1
CC: x86_64-w64-mingw32-gcc
run: |
GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc go build -v -buildmode=c-shared -o ./whatsfly/dependencies/whatsmeow/static/whatsmeow-windows-64.so ./whatsfly/dependencies/main.go
go build -v -buildmode=c-shared -o ./whatsfly/dependencies/whatsmeow/static/whatsmeow-windows-64.dll ./whatsfly/dependencies/main.go
- name: Commit changes
run: |
Expand All @@ -51,7 +58,7 @@ jobs:
git commit -am "New build"
git push
build-osx:
runs-on: windows-latest
runs-on: macos-latest
steps:
- uses: actions/checkout@v4

Expand All @@ -62,9 +69,10 @@ jobs:

- name: Build
run: |
GOOS=darwin GOARCH=amd64 go build -v -buildmode=c-shared -o ./whatsfly/dependencies/whatsmeow/static/whatsmeow-darwin-arm64.so ./whatsfly/dependencies/main.go
GOOS=darwin GOARCH=arm64 go build -v -buildmode=c-shared -o ./whatsfly/dependencies/whatsmeow/static/whatsmeow-darwin-arm64.so ./whatsfly/dependencies/main.go
GOOS=darwin GOARCH=amd64 go build -v -buildmode=c-shared -o ./whatsfly/dependencies/whatsmeow/static/whatsmeow-darwin-amd64.dylib ./whatsfly/dependencies/main.go
GOOS=darwin GOARCH=arm64 go build -v -buildmode=c-shared -o ./whatsfly/dependencies/whatsmeow/static/whatsmeow-darwin-arm64.dylib ./whatsfly/dependencies/main.go
cp ./whatsfly/dependencies/whatsmeow/static/whatsmeow-darwin-amd64.dylib ./whatsfly/dependencies/whatsmeow/static/whatsmeow-darwin-amd64-$GITHUB_SHA.dylib
cp ./whatsfly/dependencies/whatsmeow/static/whatsmeow-darwin-arm64.dylib ./whatsfly/dependencies/whatsmeow/static/whatsmeow-darwin-arm64-$GITHUB_SHA.dylib
- name: Commit changes
run: |
git config --global user.email "[email protected]"
Expand Down

0 comments on commit ffd3209

Please sign in to comment.