Create main.yml #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Build" | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build & Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v4 | |
- name: Set Up Flutter | |
uses: subosito/[email protected] | |
with: | |
flutter-version: '3.24.3' | |
- name: Install Dependencies | |
run: flutter pub get | |
- name: Build Linux App | |
- run: | | |
sudo apt-get update -y | |
sudo apt-get install clang cmake git ninja-build pkg-config libgtk-3-dev liblzma-dev libstdc++-12-dev | |
- run: flutter build linux --release --target-platform=linux-arm64,linux-x64 | |
- run: | | |
tar -czf build/linux_build_arm64.tar.gz build/linux/arm64/release/bundle | |
tar -czf build/linux_build_x64.tar.gz build/linux/x64/release/bundle | |
#9 Upload Artifacts | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: Releases | |
path: | | |
build/linux_build_arm64.tar.gz | |
build/linux_build_x64.tar.gz | |
#13 Create Release | |
- name: Create Release | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "build/app/outputs/flutter-apk/app-release.apk,build/app/outputs/bundle/release/app-release.aab,build/ios_build.tar.gz" | |
tag: v${{ env.VERSION }} | |
token: ${{ secrets.TOKEN }} |