Build and Release Artifacts #2
Workflow file for this run
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 and Release Artifacts | |
| on: | |
| release: | |
| types: [published] | |
| jobs: | |
| build-macos: | |
| runs-on: macos-15 | |
| strategy: | |
| matrix: | |
| arch: [x86_64, arm64] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Get swift version | |
| run: swift --version | |
| - name: Build for macOS | |
| run: | | |
| swift build -c release --arch ${{ matrix.arch }} | |
| mkdir -p artifacts/macos-${{ matrix.arch }} | |
| cp .build/release/fishee artifacts/macos-${{ matrix.arch }}/ | |
| - name: Upload macOS artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: fishee-macos-${{ matrix.arch }}-${{ github.ref_name }} | |
| path: artifacts/macos-${{ matrix.arch }} | |
| build-linux: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Get swift version | |
| run: swift --version | |
| - name: Build for Linux | |
| run: | | |
| swift build -c release | |
| mkdir -p artifacts/linux | |
| cp .build/release/fishee artifacts/linux/ | |
| - name: Upload Linux artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: fishee-linux-${{ github.ref_name }} | |
| path: artifacts/linux |