fix(workflow): removed the test, no test suite rn #16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This workflow will build a golang project for multiple platforms | |
| # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go | |
| name: Go | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: '1.21' # Fixed version - Go 1.25.1 doesn't exist yet | |
| - name: Get dependencies | |
| run: go mod download | |
| - name: Build for Linux | |
| run: | | |
| GOOS=linux GOARCH=amd64 go build -o build/linux-amd64/app . | |
| GOOS=linux GOARCH=arm64 go build -o build/linux-arm64/app . | |
| - name: Build for macOS | |
| run: | | |
| GOOS=darwin GOARCH=amd64 go build -o build/darwin-amd64/app . | |
| GOOS=darwin GOARCH=arm64 go build -o build/darwin-arm64/app . | |
| - name: Build for Windows | |
| run: | | |
| GOOS=windows GOARCH=amd64 go build -o build/windows-amd64/app.exe . | |
| GOOS=windows GOARCH=arm64 go build -o build/windows-arm64/app.exe . | |
| - name: Create release archives | |
| run: | | |
| cd build | |
| # Create tar.gz for Unix systems | |
| tar -czf ../app-linux-amd64.tar.gz -C linux-amd64 app | |
| tar -czf ../app-linux-arm64.tar.gz -C linux-arm64 app | |
| tar -czf ../app-darwin-amd64.tar.gz -C darwin-amd64 app | |
| tar -czf ../app-darwin-arm64.tar.gz -C darwin-arm64 app | |
| # Create zip for Windows | |
| zip -j ../app-windows-amd64.zip windows-amd64/app.exe | |
| zip -j ../app-windows-arm64.zip windows-arm64/app.exe | |
| - name: Upload Linux AMD64 Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: app-linux-amd64 | |
| path: app-linux-amd64.tar.gz | |
| retention-days: 30 | |
| - name: Upload Linux ARM64 Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: app-linux-arm64 | |
| path: app-linux-arm64.tar.gz | |
| retention-days: 30 | |
| - name: Upload macOS AMD64 Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: app-darwin-amd64 | |
| path: app-darwin-amd64.tar.gz | |
| retention-days: 30 | |
| - name: Upload macOS ARM64 Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: app-darwin-arm64 | |
| path: app-darwin-arm64.tar.gz | |
| retention-days: 30 | |
| - name: Upload Windows AMD64 Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: app-windows-amd64 | |
| path: app-windows-amd64.zip | |
| retention-days: 30 | |
| - name: Upload Windows ARM64 Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: app-windows-arm64 | |
| path: app-windows-arm64.zip | |
| retention-days: 30 |