2025-02-08 20:14:50 -08:00
|
|
|
name: Build and Release Artifacts
|
2025-02-08 19:17:28 -08:00
|
|
|
|
|
|
|
on:
|
|
|
|
release:
|
2025-02-08 20:14:50 -08:00
|
|
|
types: [published]
|
2025-02-08 19:17:28 -08:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build-macos:
|
2025-02-09 09:34:02 -08:00
|
|
|
runs-on: macos-15
|
2025-02-08 19:17:28 -08:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
arch: [x86_64, arm64]
|
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
2025-02-09 10:26:27 -08:00
|
|
|
uses: actions/checkout@v4
|
2025-02-08 19:17:28 -08:00
|
|
|
|
|
|
|
- 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 }}
|
2025-02-09 16:14:59 -08:00
|
|
|
cp .build/release/fishee artifacts/macos-${{ matrix.arch }}/fishee-macos-${{ matrix.arch }}-${{ github.event.release.tag_name }}
|
2025-02-08 19:17:28 -08:00
|
|
|
|
2025-02-09 11:59:44 -08:00
|
|
|
- name: Upload macOS artifacts as release assets
|
|
|
|
uses: softprops/action-gh-release@v2
|
2025-02-08 19:17:28 -08:00
|
|
|
with:
|
2025-02-09 16:14:59 -08:00
|
|
|
files: artifacts/macos-${{ matrix.arch }}/fishee-macos-${{ matrix.arch }}-${{ github.event.release.tag_name }}
|
2025-02-09 11:59:44 -08:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2025-02-08 19:17:28 -08:00
|
|
|
|
|
|
|
build-linux:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
2025-02-09 10:26:27 -08:00
|
|
|
uses: actions/checkout@v4
|
2025-02-08 19:17:28 -08:00
|
|
|
|
|
|
|
- name: Get swift version
|
|
|
|
run: swift --version
|
|
|
|
|
|
|
|
- name: Build for Linux
|
|
|
|
run: |
|
|
|
|
swift build -c release
|
|
|
|
mkdir -p artifacts/linux
|
2025-02-09 16:14:59 -08:00
|
|
|
cp .build/release/fishee artifacts/linux/fishee-linux-${{ github.event.release.tag_name }}
|
2025-02-08 19:17:28 -08:00
|
|
|
|
2025-02-09 11:59:44 -08:00
|
|
|
- name: Upload Linux artifacts as release assets
|
|
|
|
uses: softprops/action-gh-release@v2
|
2025-02-08 19:17:28 -08:00
|
|
|
with:
|
2025-02-09 16:14:59 -08:00
|
|
|
files: artifacts/linux/fishee-linux-${{ github.event.release.tag_name }}
|
2025-02-09 11:59:44 -08:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|