Build #6
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
| name: Build | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| workflow_dispatch: | |
| jobs: | |
| build-macos-amd64: | |
| runs-on: macos-15 | |
| defaults: | |
| run: | |
| working-directory: repos/desktop | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version: "1.25" | |
| cache: false | |
| - name: Build | |
| env: | |
| CGO_ENABLED: 1 | |
| GOOS: darwin | |
| GOARCH: amd64 | |
| run: | | |
| mkdir -p build | |
| go build -o build/cadaide-amd64 ./src/main.go | |
| - name: Debug | |
| working-directory: repos/desktop | |
| run: | | |
| pwd | |
| ls -la | |
| ls -la build/ || echo "build/ neexistuje" | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: cadaide-macos-amd64 | |
| path: repos/desktop/build/cadaide-amd64 | |
| build-macos-arm64: | |
| runs-on: macos-15 | |
| defaults: | |
| run: | |
| working-directory: repos/desktop | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version: "1.25" | |
| cache: false | |
| - name: Build | |
| env: | |
| CGO_ENABLED: 1 | |
| GOOS: darwin | |
| GOARCH: arm64 | |
| run: | | |
| mkdir -p build | |
| go build -o build/cadaide-arm64 ./src/main.go | |
| - name: Debug | |
| working-directory: repos/desktop | |
| run: | | |
| pwd | |
| ls -la | |
| ls -la build/ || echo "build/ neexistuje" | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: cadaide-macos-arm64 | |
| path: repos/desktop/build/cadaide-arm64 | |
| universal-macos: | |
| needs: [build-macos-amd64, build-macos-arm64] | |
| runs-on: macos-15 | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: cadaide-macos-amd64 | |
| path: build | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: cadaide-macos-arm64 | |
| path: build | |
| - name: Create universal binary | |
| run: lipo -create -output build/cadaide build/cadaide-amd64 build/cadaide-arm64 | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: cadaide-macos | |
| path: build/cadaide |