release_schedule/.github/workflows/build.yml

74 lines
2.0 KiB
YAML
Raw Normal View History

2023-11-16 15:35:00 +01:00
name: CI
on:
workflow_dispatch:
jobs:
build-linux:
name: Build for Linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
2023-11-16 15:35:00 +01:00
with:
2023-11-16 15:40:52 +01:00
channel: 'stable'
flutter-version: '3.x'
- run: |
sudo apt-get update -y
sudo apt-get install -y ninja-build libgtk-3-dev
2023-11-16 15:35:00 +01:00
- run: flutter config --enable-linux-desktop
- run: flutter pub get
- run: flutter build linux
2023-11-16 15:35:00 +01:00
- name: Archive Linux Artifact
uses: actions/upload-artifact@master
with:
name: linux-build
2023-11-16 16:16:09 +01:00
path: build/linux/x64/release/bundle
2023-11-16 15:35:00 +01:00
build-android:
name: Build for Android
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
2023-11-16 15:35:00 +01:00
with:
2023-11-16 15:40:52 +01:00
channel: 'stable'
flutter-version: '3.x'
2023-11-16 15:35:00 +01:00
- uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '11'
- run: flutter config --enable-android
- run: flutter pub get
- run: flutter build apk
- run: flutter build appbundle
- name: Archive Android Artifact
uses: actions/upload-artifact@master
with:
name: android-build
path: |
build/app/outputs/flutter-apk/app-release.apk
build/app/outputs/bundle/release/app-release.aab
build-and-publish-web:
name: Build and Publish for Web
runs-on: ubuntu-latest
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
2023-11-16 15:35:00 +01:00
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
2023-11-16 15:35:00 +01:00
with:
2023-11-16 15:40:52 +01:00
channel: 'stable'
flutter-version: '3.x'
- run: flutter config --enable-web
- run: flutter pub get
- run: flutter build web --base-href "/release_schedule/"
2023-11-16 15:35:00 +01:00
- name: Publish to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build/web