fix github action #3
Workflow file for this run
This file contains hidden or 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: Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| permissions: | |
| contents: write | |
| jobs: | |
| changelog: | |
| name: Generate changelog | |
| runs-on: ubuntu-latest | |
| outputs: | |
| release_body: ${{ steps.git_cliff.outputs.content }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| ref: main | |
| fetch-depth: 0 | |
| # `persist-credentials` is required to push new commits to the repository. | |
| persist-credentials: true | |
| - name: Generate changelog | |
| id: git_cliff | |
| uses: orhun/git-cliff-action@v4 | |
| with: | |
| config: cliff.toml | |
| args: --latest --strip header | |
| - name: Update CHANGELOG.md | |
| uses: orhun/git-cliff-action@v4 | |
| with: | |
| config: cliff.toml | |
| args: --output CHANGELOG.md | |
| - name: Commit CHANGELOG.md | |
| uses: stefanzweifel/git-auto-commit-action@v7 | |
| with: | |
| commit_message: "chore(release): update CHANGELOG.md for ${{ github.ref_name }}" | |
| file_pattern: CHANGELOG.md | |
| build-android: | |
| name: Build Android | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Set up Java | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: temurin | |
| java-version: '17' | |
| - name: Set up Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: '3.41.7' | |
| cache: true | |
| - name: Install Fastforge | |
| run: dart pub global activate fastforge | |
| - name: Install dependencies | |
| run: flutter pub get | |
| - name: Generate code | |
| run: dart run build_runner build --delete-conflicting-outputs | |
| - name: Package APK | |
| run: fastforge package --platform android --targets apk | |
| - name: Upload Android artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: classi-android-apk | |
| path: dist/**/*.apk | |
| build-linux: | |
| name: Build Linux | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Install Linux build dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev libsecret-1-dev libssl-dev locate | |
| - name: Install appimagetool | |
| run: | | |
| wget -q -O appimagetool "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage" | |
| chmod +x appimagetool | |
| sudo mv appimagetool /usr/local/bin/ | |
| - name: Set up Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: '3.41.7' | |
| cache: true | |
| - name: Install Fastforge | |
| run: dart pub global activate fastforge | |
| - name: Install dependencies | |
| run: flutter pub get | |
| - name: Generate code | |
| run: dart run build_runner build --delete-conflicting-outputs | |
| - name: Package AppImage | |
| run: fastforge package --platform linux --targets appimage | |
| - name: Upload Linux artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: classi-linux-appimage | |
| path: dist/**/*.AppImage | |
| build-macos: | |
| name: Build macOS | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Install appdmg | |
| run: npm install -g appdmg | |
| - name: Set up Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: '3.41.7' | |
| cache: true | |
| - name: Install Fastforge | |
| run: dart pub global activate fastforge | |
| - name: Install dependencies | |
| run: flutter pub get | |
| - name: Generate code | |
| run: dart run build_runner build --delete-conflicting-outputs | |
| - name: Package DMG | |
| run: fastforge package --platform macos --targets dmg | |
| - name: Upload macOS artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: classi-macos-dmg | |
| path: dist/**/*.dmg | |
| build-windows: | |
| name: Build Windows | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Install Inno Setup | |
| run: choco install innosetup --no-progress -y | |
| - name: Set up Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: '3.41.7' | |
| cache: true | |
| - name: Install Fastforge | |
| run: dart pub global activate fastforge | |
| - name: Install dependencies | |
| run: flutter pub get | |
| - name: Generate code | |
| run: dart run build_runner build --delete-conflicting-outputs | |
| - name: Package EXE | |
| run: fastforge package --platform windows --targets exe | |
| - name: Upload Windows artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: classi-windows-exe | |
| path: dist/**/*.exe | |
| release: | |
| name: Create GitHub Release | |
| needs: [changelog, build-android, build-linux, build-macos, build-windows] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| body: ${{ needs.changelog.outputs.release_body }} | |
| files: | | |
| artifacts/classi-android-apk/**/*.apk | |
| artifacts/classi-linux-appimage/**/*.AppImage | |
| artifacts/classi-macos-dmg/**/*.dmg | |
| artifacts/classi-windows-exe/**/*.exe |