ci: add macOS & Windows builds with artifact upload
This commit is contained in:
@@ -35,13 +35,64 @@ jobs:
|
|||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: |
|
run: |
|
||||||
$tag = "${{ github.ref_name }}"
|
$tag = "${{ github.ref_name }}"
|
||||||
if (-not $tag) { $tag = "v3.0.0" }
|
if (-not $tag) { $tag = "v3.4.1" }
|
||||||
$zipName = "Lunaris-$tag-windows-x64.zip"
|
$zipName = "Prisma-$tag-windows-x64.zip"
|
||||||
Compress-Archive -Path "build\windows\x64\runner\Release\*" -DestinationPath $zipName
|
Compress-Archive -Path "build\windows\x64\runner\Release\*" -DestinationPath $zipName
|
||||||
echo "ZIP_NAME=$zipName" >> $env:GITHUB_ENV
|
echo "ZIP_NAME=$zipName" >> $env:GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Upload Windows Artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: Prisma-windows-x64
|
||||||
|
path: ${{ env.ZIP_NAME }}
|
||||||
|
|
||||||
- name: Upload to GitHub Release
|
- name: Upload to GitHub Release
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
|
with:
|
||||||
|
files: ${{ env.ZIP_NAME }}
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
build-macos:
|
||||||
|
name: Build macOS
|
||||||
|
runs-on: macos-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout Code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup Flutter
|
||||||
|
uses: subosito/flutter-action@v2
|
||||||
|
with:
|
||||||
|
flutter-version: '3.27.4'
|
||||||
|
channel: 'stable'
|
||||||
|
cache: true
|
||||||
|
|
||||||
|
- name: Install Dependencies
|
||||||
|
run: flutter pub get
|
||||||
|
|
||||||
|
- name: Build macOS Release
|
||||||
|
run: flutter build macos --release
|
||||||
|
|
||||||
|
- name: Package macOS Zip
|
||||||
|
run: |
|
||||||
|
TAG="${{ github.ref_name }}"
|
||||||
|
if [ -z "$TAG" ]; then TAG="v3.4.1"; fi
|
||||||
|
ZIP_NAME="Prisma-$TAG-macos.zip"
|
||||||
|
cd build/macos/Build/Products/Release
|
||||||
|
zip -r -y "$GITHUB_WORKSPACE/$ZIP_NAME" Prisma.app
|
||||||
|
echo "ZIP_NAME=$ZIP_NAME" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Upload macOS Artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: Prisma-macos
|
||||||
|
path: ${{ env.ZIP_NAME }}
|
||||||
|
|
||||||
|
- name: Upload to GitHub Release
|
||||||
|
uses: softprops/action-gh-release@v2
|
||||||
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
with:
|
with:
|
||||||
files: ${{ env.ZIP_NAME }}
|
files: ${{ env.ZIP_NAME }}
|
||||||
env:
|
env:
|
||||||
|
|||||||
Reference in New Issue
Block a user