chore: bump version to 0.11.0+126 #53
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 and Deploy NeoStation | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| workflow_dispatch: | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| jobs: | |
| lint: | |
| name: Lint, Analysis & Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Setup Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| # Pinned via .fvmrc (the single source of truth for the SDK version), | |
| # not `channel: stable`. An unpinned stable silently moves under CI: | |
| # 3.47.0 shipped a `dart format` that relaid out a file nobody had | |
| # touched and an `unawaited_return_in_try_block` lint that fires in | |
| # four existing files, so main went red without a commit. | |
| # Bump .fvmrc deliberately, in its own PR, with the fallout fixed. | |
| flutter-version-file: .fvmrc | |
| channel: 'stable' | |
| cache: true | |
| # --enforce-lockfile, so a pubspec.lock resolved on a different SDK fails | |
| # here instead of being silently rewritten in the runner. See pr-checks.yml. | |
| - name: Install dependencies | |
| run: flutter pub get --enforce-lockfile | |
| - name: Verify formatting | |
| run: dart format --output=none --set-exit-if-changed . | |
| - name: Analyze project | |
| run: flutter analyze | |
| - name: Run tests | |
| run: flutter test | |
| build: | |
| name: Build ${{ matrix.target }} | |
| needs: lint | |
| runs-on: ${{ matrix.os }} | |
| environment: Production | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - target: windows | |
| os: windows-latest | |
| - target: macos | |
| os: macos-latest | |
| - target: android | |
| os: ubuntu-latest | |
| - target: linux-x64 | |
| os: ubuntu-latest | |
| - target: linux-arm | |
| os: ubuntu-24.04-arm | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v7 | |
| - name: Create .env from secrets | |
| shell: bash | |
| env: | |
| SCREENSCRAPER_DEV_ID: ${{ secrets.SCREENSCRAPER_DEV_ID }} | |
| SCREENSCRAPER_DEV_PASSWORD: ${{ secrets.SCREENSCRAPER_DEV_PASSWORD }} | |
| run: | | |
| : > .env | |
| [ -n "$SCREENSCRAPER_DEV_ID" ] && echo "SCREENSCRAPER_DEV_ID=$SCREENSCRAPER_DEV_ID" >> .env | |
| [ -n "$SCREENSCRAPER_DEV_PASSWORD" ] && echo "SCREENSCRAPER_DEV_PASSWORD=$SCREENSCRAPER_DEV_PASSWORD" >> .env | |
| echo ".env created with $(wc -l < .env) lines" | |
| - name: Setup Java (for Android) | |
| if: matrix.target == 'android' | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: 'zulu' | |
| java-version: '17' | |
| - name: Setup Flutter (x64) | |
| if: matrix.target != 'linux-arm' | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version-file: .fvmrc | |
| channel: 'stable' | |
| cache: true | |
| - name: Setup Flutter (ARM64 Manual) | |
| if: matrix.target == 'linux-arm' | |
| run: | | |
| git clone -b "$(jq -r .flutter .fvmrc)" --depth 1 https://github.com/flutter/flutter.git $HOME/flutter | |
| echo "$HOME/flutter/bin" >> $GITHUB_PATH | |
| export PATH="$HOME/flutter/bin:$PATH" | |
| flutter config --no-analytics | |
| flutter precache --linux | |
| - name: Cache Flutter and Gradle | |
| uses: actions/cache@v6 | |
| with: | |
| path: | | |
| ~/.pub-cache | |
| ~/AppData/Local/Pub/Cache | |
| ~/.gradle/caches | |
| ~/.gradle/wrapper | |
| key: ${{ runner.os }}-flutter-cache-${{ hashFiles('**/pubspec.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-flutter-cache- | |
| - name: Install macOS dependencies | |
| if: matrix.target == 'macos' | |
| run: brew install create-dmg | |
| - name: Build Windows | |
| if: matrix.target == 'windows' | |
| shell: pwsh | |
| run: .\build-utils\build-windows.ps1 | |
| - name: Build macOS | |
| if: matrix.target == 'macos' | |
| run: bash build-utils/build-macos.sh | |
| - name: Setup Android Keystore | |
| if: matrix.target == 'android' | |
| shell: bash | |
| env: | |
| ANDROID_KEYSTORE_BASE64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }} | |
| run: | | |
| if [ -n "$ANDROID_KEYSTORE_BASE64" ]; then | |
| echo "$ANDROID_KEYSTORE_BASE64" | base64 -d > android/app/release.jks | |
| echo "Keystore decoded to android/app/release.jks" | |
| elif [ "${{ github.event_name }}" = "push" ] && [ "${{ startsWith(github.ref, 'refs/tags/') }}" = "true" ]; then | |
| echo "::error::ANDROID_KEYSTORE_BASE64 secret is required for tagged releases." | |
| exit 1 | |
| else | |
| echo "No ANDROID_KEYSTORE_BASE64 secret found. Build will use debug signing." | |
| fi | |
| - name: Build Android | |
| if: matrix.target == 'android' | |
| env: | |
| KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }} | |
| KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }} | |
| KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }} | |
| KEYSTORE_PATH: release.jks | |
| run: bash build-utils/build-android.sh | |
| - name: Cache Linux build tools | |
| if: matrix.target == 'linux-x64' || matrix.target == 'linux-arm' | |
| uses: actions/cache@v6 | |
| with: | |
| path: | | |
| .cache/build-tools | |
| .cache/mdk-sdk-linux.tar.xz | |
| key: ${{ runner.os }}-${{ runner.arch }}-linuxdeploy-${{ hashFiles('build-utils/build-linux*.sh') }} | |
| restore-keys: | | |
| ${{ runner.os }}-${{ runner.arch }}-linuxdeploy- | |
| - name: Install Linux Build Dependencies | |
| if: matrix.target == 'linux-x64' || matrix.target == 'linux-arm' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y curl git unzip xz-utils zip libglu1-mesa clang cmake ninja-build pkg-config \ | |
| libgtk-3-dev liblzma-dev libstdc++-12-dev libsqlite3-dev libsecret-1-dev libjsoncpp-dev \ | |
| libasound2-dev libpulse-dev libopus-dev libvorbis-dev libflac-dev libogg-dev python3 \ | |
| python3-pip imagemagick patchelf dos2unix desktop-file-utils libgdk-pixbuf2.0-dev \ | |
| fakeroot strace file libfuse2 squashfs-tools wget lld | |
| - name: Build Linux x64 | |
| if: matrix.target == 'linux-x64' | |
| run: bash build-utils/build-linux.sh | |
| - name: Build Linux ARM | |
| if: matrix.target == 'linux-arm' | |
| run: bash build-utils/build-linuxarm.sh | |
| - name: Upload Artifacts | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: neostation-${{ matrix.target }} | |
| path: release/* | |
| if-no-files-found: warn | |
| release: | |
| name: Publish Release | |
| needs: build | |
| if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: read | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| path: release-artifacts | |
| pattern: neostation-* | |
| merge-multiple: true | |
| - name: Build Changelog | |
| id: build_changelog | |
| uses: mikepenz/release-changelog-builder-action@v6 | |
| with: | |
| configuration: ".github/changelog-config.json" | |
| ignorePreReleases: "false" | |
| failOnError: "false" | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Get version from pubspec | |
| id: version | |
| run: | | |
| VERSION=$(grep '^version:' pubspec.yaml | head -1 | awk '{print $2}' | tr -d '\r') | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v3 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| name: NeoStation Beta ${{ steps.version.outputs.version }} | |
| body: ${{ steps.build_changelog.outputs.changelog }} | |
| files: release-artifacts/* | |
| draft: true |