Skip to content

Commit

Permalink
Update release.yaml, added cross platform builds
Browse files Browse the repository at this point in the history
  • Loading branch information
sugan0tech authored Dec 9, 2024
1 parent bc7f6a0 commit 928d54c
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,25 @@ jobs:
with:
go-version: '1.22'

- name: Build
- name: Build for multiple platforms
run: |
go build -o tmuxcraft ./cmd/tmuxcraft/main.go
mkdir -p dist
GOOS=linux GOARCH=amd64 go build -o dist/tmuxcraft-linux-amd64 ./cmd/tmuxcraft/main.go
GOOS=darwin GOARCH=amd64 go build -o dist/tmuxcraft-darwin-amd64 ./cmd/tmuxcraft/main.go
GOOS=darwin GOARCH=arm64 go build -o dist/tmuxcraft-darwin-arm64 ./cmd/tmuxcraft/main.go
GOOS=windows GOARCH=amd64 go build -o dist/tmuxcraft-windows-amd64.exe ./cmd/tmuxcraft/main.go
- name: Compress binaries
run: |
zip dist/tmuxcraft-linux-amd64.zip dist/tmuxcraft-linux-amd64
zip dist/tmuxcraft-darwin-amd64.zip dist/tmuxcraft-darwin-amd64
zip dist/tmuxcraft-darwin-arm64.zip dist/tmuxcraft-darwin-arm64
zip dist/tmuxcraft-windows-amd64.zip dist/tmuxcraft-windows-amd64.exe
- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: tmuxcraft
files: |
dist/*.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 928d54c

Please sign in to comment.