Workflow: lets try windows instead of iOS build

This commit is contained in:
dan63047 2023-07-12 00:33:08 +03:00
parent 7f8541e0df
commit c7edef7bcd
1 changed files with 35 additions and 13 deletions

View File

@ -11,8 +11,38 @@ on:
name: "Build & Release" name: "Build & Release"
jobs: jobs:
build: build:
name: Build & Release name: Build Windows App
runs-on: macos-latest runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: subosito/flutter-action@v1
with:
channel: 'stable'
flutter-version: '3.10.5'
- name: Install project dependencies
run: flutter pub get
- name: Generate intermediates
run: flutter pub run build_runner build --delete-conflicting-outputs
- name: Build artifacts
run: flutter build windows --release
- name: Archive Release
uses: thedoctor0/zip-release@master
with:
type: 'zip'
filename: TetraStats-${{github.ref_name}}-windows.zip
directory: build/windows/runner/Release
- name: Push to Releases
uses: ncipollo/release-action@v1
with:
prerelease: true
discussionCategory: autobuilded-releases
artifacts: "build/windows/runner/Release/TetraStats-${{github.ref_name}}-windows.zip"
tag: Automated build №${{ github.run_number }}
body: This build was builded with GitHub Action workflow
token: ${{ secrets.TOKEN }}
build:
name: Build Android App
runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
- uses: actions/setup-java@v1 - uses: actions/setup-java@v1
@ -22,22 +52,14 @@ jobs:
with: with:
flutter-version: '3.10.5' flutter-version: '3.10.5'
- run: flutter pub get - run: flutter pub get
- run: flutter test # - run: flutter test // lmao. Tests? Who needs it?
- run: flutter build apk --split-per-abi - run: flutter build apk --split-per-abi
- run: |
flutter build ios --no-codesign
cd build/ios/iphoneos
mkdir Payload
cd Payload
ln -s ../Runner.app
cd ..
zip -r app.ipa Payload
- name: Push to Releases - name: Push to Releases
uses: ncipollo/release-action@v1 uses: ncipollo/release-action@v1
with: with:
prerelease: true prerelease: true
discussionCategory: autobuilded-releases # discussionCategory: autobuilded-releases
artifacts: "build/app/outputs/apk/debug/*,build/ios/iphoneos/app.ipa" artifacts: "build/app/outputs/apk/debug/*"
tag: Automated build №${{ github.run_number }} tag: Automated build №${{ github.run_number }}
body: This build was builded with GitHub Action workflow body: This build was builded with GitHub Action workflow
token: ${{ secrets.TOKEN }} token: ${{ secrets.TOKEN }}