Bump build number for next test build #30
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: Build | |
| on: | |
| push: | |
| tags: | |
| - 'v*.*.*' | |
| workflow_dispatch: | |
| jobs: | |
| # ── Linux ────────────────────────────────────────────────────────────────── | |
| build-linux: | |
| name: Build Linux | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Linux dependencies | |
| run: | | |
| sudo apt-get update -qq | |
| sudo apt-get install -y --no-install-recommends \ | |
| clang cmake ninja-build pkg-config \ | |
| libgtk-3-dev libblkid-dev liblzma-dev \ | |
| libmpv-dev mpv \ | |
| libgstreamer1.0-dev \ | |
| libgstreamer-plugins-base1.0-dev \ | |
| gstreamer1.0-plugins-good \ | |
| gstreamer1.0-plugins-bad \ | |
| gstreamer1.0-libav | |
| - uses: subosito/flutter-action@v2 | |
| with: | |
| channel: stable | |
| cache: true | |
| - run: flutter pub get | |
| - run: dart run build_runner build --delete-conflicting-outputs | |
| - run: flutter build linux --release | |
| - name: Package artifact | |
| run: | | |
| tar -czf mediashelf-linux-x64.tar.gz \ | |
| -C build/linux/x64/release/bundle . | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: mediashelf-linux-x64 | |
| path: mediashelf-linux-x64.tar.gz | |
| retention-days: 30 | |
| # ── Windows ──────────────────────────────────────────────────────────────── | |
| build-windows: | |
| name: Build Windows | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: subosito/flutter-action@v2 | |
| with: | |
| channel: stable | |
| cache: true | |
| - run: flutter pub get | |
| - run: dart run build_runner build --delete-conflicting-outputs | |
| - run: flutter build windows --release | |
| - name: Package artifact | |
| shell: pwsh | |
| run: | | |
| Compress-Archive ` | |
| -Path build/windows/x64/runner/Release/* ` | |
| -DestinationPath mediashelf-windows-x64.zip | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: mediashelf-windows-x64 | |
| path: mediashelf-windows-x64.zip | |
| retention-days: 30 | |
| # ── Android ──────────────────────────────────────────────────────────────── | |
| build-android: | |
| name: Build Android | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: '17' | |
| - uses: subosito/flutter-action@v2 | |
| with: | |
| channel: stable | |
| cache: true | |
| - run: flutter pub get | |
| - run: dart run build_runner build --delete-conflicting-outputs | |
| - name: Build APK (release unsigned) | |
| run: flutter build apk --release | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: mediashelf-android | |
| path: build/app/outputs/flutter-apk/app-release.apk | |
| retention-days: 30 | |
| # ── macOS ────────────────────────────────────────────────────────────────── | |
| build-macos: | |
| name: Build macOS | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: subosito/flutter-action@v2 | |
| with: | |
| channel: stable | |
| cache: true | |
| - run: flutter pub get | |
| - run: dart run build_runner build --delete-conflicting-outputs | |
| - run: flutter build macos --release | |
| - name: Package artifact | |
| run: | | |
| cd build/macos/Build/Products/Release | |
| zip -r "$GITHUB_WORKSPACE/mediashelf-macos.zip" mediashelf.app | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: mediashelf-macos | |
| path: mediashelf-macos.zip | |
| retention-days: 30 | |
| # ── GitHub Release (nur bei Version-Tags) ───────────────────────────────── | |
| release: | |
| name: Create Release | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| needs: [build-linux, build-windows, build-android, build-macos] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| merge-multiple: false | |
| - name: Create GitHub Release | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| TAG="${GITHUB_REF_NAME}" | |
| gh release create "$TAG" \ | |
| --title "MediaShelf $TAG" \ | |
| --generate-notes \ | |
| "artifacts/mediashelf-linux-x64/mediashelf-linux-x64.tar.gz#mediashelf-linux-x64.tar.gz" \ | |
| "artifacts/mediashelf-windows-x64/mediashelf-windows-x64.zip#mediashelf-windows-x64.zip" \ | |
| "artifacts/mediashelf-android/app-release.apk#mediashelf-android.apk" \ | |
| "artifacts/mediashelf-macos/mediashelf-macos.zip#mediashelf-macos.zip" |