mirror of
https://github.com/softinio/Fishee.git
synced 2025-02-22 21:46:05 -08:00
51 lines
1.3 KiB
YAML
51 lines
1.3 KiB
YAML
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/apple/Products/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
|