TetraStats/.github/workflows/main.yml

100 lines
3.3 KiB
YAML
Raw Normal View History

on:
pull_request:
branches:
- main
- master
push:
branches:
- main
- master
- develop
name: "Build & Release"
jobs:
2023-07-11 21:36:28 +00:00
build-and-release-windows:
name: Build Windows App
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: subosito/flutter-action@v1
with:
channel: 'stable'
2024-08-03 18:05:04 +00:00
flutter-version: '3.22.3'
- name: Install project dependencies
run: flutter pub get
- 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
2024-01-01 21:43:12 +00:00
directory: build/windows/x64/runner/Release
- name: Push to Releases
uses: ncipollo/release-action@v1
with:
prerelease: true
2023-07-11 22:12:05 +00:00
allowUpdates: true
replacesArtifacts: false
discussionCategory: autobuilded-releases
2024-01-01 21:43:12 +00:00
artifacts: "build/windows/x64/runner/Release/TetraStats-${{github.ref_name}}-windows.zip"
tag: Auto-${{ github.run_number }}
body: Build with GitHub Action workflow
2024-01-01 21:43:12 +00:00
token: ${{ secrets.TOKEN }}
2024-07-31 21:50:15 +00:00
build-and-release-linux:
name: Build Linux App
runs-on: ubuntu-latest
steps:
2024-07-31 21:50:15 +00:00
- uses: actions/checkout@v2
- uses: ashutoshvarma/setup-ninja@master
2024-09-04 21:39:07 +00:00
- uses: subosito/flutter-action@v1
with:
2024-07-31 21:50:15 +00:00
channel: 'stable'
2024-08-03 18:05:04 +00:00
flutter-version: '3.22.3'
2024-07-31 21:50:15 +00:00
- name: Install project dependencies
2024-08-03 18:05:04 +00:00
run: |
flutter pub get
sudo apt-get install -y ninja-build libgtk-3-dev
2024-07-31 21:50:15 +00:00
- name: Build artifacts
run: flutter build linux --release
- name: Archive Release
uses: thedoctor0/zip-release@master
with:
type: 'zip'
filename: TetraStats-${{github.ref_name}}-linux.zip
2024-08-03 18:25:14 +00:00
directory: build/linux/x64/release/bundle
- name: Push to Releases
uses: ncipollo/release-action@v1
with:
prerelease: true
2023-07-11 22:12:05 +00:00
allowUpdates: true
replacesArtifacts: false
2023-07-11 22:12:05 +00:00
discussionCategory: autobuilded-releases
2024-07-31 21:50:15 +00:00
artifacts: "build/linux/x64/release/bundle/TetraStats-${{github.ref_name}}-linux.zip"
2023-07-11 22:03:10 +00:00
tag: Auto-${{ github.run_number }}
body: Build with GitHub Action workflow
2024-07-31 21:50:15 +00:00
token: ${{ secrets.TOKEN }}
# build-and-release-android:
# name: Build Android App
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v1
# - uses: actions/setup-java@v1
# with:
# java-version: '12.x'
# - uses: subosito/flutter-action@v1
# with:
# flutter-version: '3.16.5'
# - run: flutter pub get
# # - run: flutter test // lmao. Tests? Who needs it?
# - run: flutter build apk --split-per-abi
# - name: Push to Releases
# uses: ncipollo/release-action@v1
# with:
# prerelease: true
# allowUpdates: true
# replacesArtifacts: false
# discussionCategory: autobuilded-releases
# artifacts: "build/app/outputs/flutter-apk/*"
# tag: Auto-${{ github.run_number }}
# body: Build with GitHub Action workflow
2024-07-31 21:50:15 +00:00
# token: ${{ secrets.TOKEN }}