Files
PiliPlus/.github/workflows/mac.yml
bggRGjQaUbCoE 0ae4157384 create release
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-19 14:40:40 +08:00

59 lines
1.4 KiB
YAML

name: Build for Mac
on:
workflow_call:
inputs:
tag:
description: "tag"
required: false
default: ""
type: string
workflow_dispatch:
jobs:
build-mac-app:
name: Release Mac
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Setup flutter
uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version-file: pubspec.yaml
- name: Set and Extract version
shell: pwsh
run: lib/scripts/build.ps1
- name: Build Mac
run: flutter build macos --release --dart-define-from-file=pili_release.json
- name: Prepare Upload
run: |
npm install --global create-dmg
create-dmg build/macos/Build/Products/Release/PiliPlus.app
continue-on-error: true
- name: Rename DMG
run: mv PiliPlus*.dmg PiliPlus_macos_${{ env.version }}.dmg
- name: Release
if: ${{ github.event.inputs.tag != '' }}
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.event.inputs.tag }}
name: ${{ github.event.inputs.tag }}
files: |
PiliPlus_macos_*.dmg
- name: Upload macos release
uses: actions/upload-artifact@v4
with:
name: macOS-release
path: PiliPlus_macos_*.dmg