release: cut v1.199.0 #256
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*" | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: false | |
| env: | |
| FLUTTER_VERSION: "3.41.5" | |
| jobs: | |
| build-linux: | |
| name: Build Linux (${{ matrix.arch_tag }}) | |
| runs-on: ${{ matrix.runner }} | |
| timeout-minutes: 30 | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| include: | |
| - runner: ubuntu-latest | |
| arch_tag: x64 | |
| flutter_arch: x64 | |
| bundle_dir: build/linux/x64/release/bundle | |
| asset_name: codewalk-linux-x64.tar.gz | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| channel: stable | |
| flutter-version: ${{ env.FLUTTER_VERSION }} | |
| architecture: ${{ matrix.flutter_arch }} | |
| cache: true | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.25" | |
| - name: Install Linux dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libayatana-appindicator3-dev libsecret-1-dev | |
| - name: Install dependencies | |
| run: flutter pub get | |
| - name: Build Linux | |
| run: flutter build linux --release | |
| - name: Package Linux artifact | |
| run: tar -czf "${{ matrix.asset_name }}" -C "${{ matrix.bundle_dir }}" . | |
| - name: Upload Linux artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: codewalk-linux-${{ matrix.arch_tag }} | |
| path: ${{ matrix.asset_name }} | |
| retention-days: 2 | |
| build-windows: | |
| name: Build Windows (${{ matrix.arch_tag }}) | |
| runs-on: ${{ matrix.runner }} | |
| timeout-minutes: 35 | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| include: | |
| - runner: windows-latest | |
| arch_tag: x64 | |
| flutter_arch: x64 | |
| build_dir: build/windows/x64/runner/Release | |
| asset_name: codewalk-windows-x64.zip | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| channel: stable | |
| flutter-version: ${{ env.FLUTTER_VERSION }} | |
| architecture: ${{ matrix.flutter_arch }} | |
| cache: false | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.25" | |
| - name: Install dependencies | |
| run: flutter pub get | |
| - name: Build Windows | |
| run: flutter build windows --release | |
| - name: Package Windows artifact | |
| shell: pwsh | |
| run: Compress-Archive -Path "${{ matrix.build_dir }}/*" -DestinationPath "${{ matrix.asset_name }}" | |
| - name: Upload Windows artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: codewalk-windows-${{ matrix.arch_tag }} | |
| path: ${{ matrix.asset_name }} | |
| retention-days: 2 | |
| build-macos: | |
| name: Build macOS (${{ matrix.arch_tag }}) | |
| runs-on: ${{ matrix.runner }} | |
| timeout-minutes: 35 | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| include: | |
| - runner: macos-15 | |
| arch_tag: arm64 | |
| flutter_arch: arm64 | |
| asset_name: codewalk-macos-arm64.tar.gz | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| channel: stable | |
| flutter-version: ${{ env.FLUTTER_VERSION }} | |
| architecture: ${{ matrix.flutter_arch }} | |
| cache: true | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.25" | |
| - name: Install dependencies | |
| run: flutter pub get | |
| - name: Build macOS | |
| run: MACOSX_DEPLOYMENT_TARGET=11.0 flutter build macos --release | |
| - name: Package macOS artifact | |
| run: tar -czf "${{ matrix.asset_name }}" -C build/macos/Build/Products/Release codewalk.app | |
| - name: Upload macOS artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: codewalk-macos-${{ matrix.arch_tag }} | |
| path: ${{ matrix.asset_name }} | |
| retention-days: 2 | |
| build-android: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 35 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: "17" | |
| cache: gradle | |
| - name: Setup Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| channel: stable | |
| flutter-version: ${{ env.FLUTTER_VERSION }} | |
| cache: true | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.25" | |
| - name: Setup Android signing | |
| env: | |
| KEYSTORE_BASE64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }} | |
| STORE_PASSWORD: ${{ secrets.ANDROID_STORE_PASSWORD }} | |
| KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }} | |
| KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }} | |
| run: | | |
| if [ -z "$KEYSTORE_BASE64" ] || [ -z "$STORE_PASSWORD" ] || [ -z "$KEY_PASSWORD" ] || [ -z "$KEY_ALIAS" ]; then | |
| echo "Android signing secrets are incomplete. Refusing to build a release APK with a different key." | |
| exit 1 | |
| fi | |
| echo "$KEYSTORE_BASE64" | base64 --decode > android/upload-keystore.jks | |
| { | |
| echo "storePassword=$STORE_PASSWORD" | |
| echo "keyPassword=$KEY_PASSWORD" | |
| echo "keyAlias=$KEY_ALIAS" | |
| echo "storeFile=upload-keystore.jks" | |
| } > android/key.properties | |
| - name: Install dependencies | |
| run: flutter pub get | |
| - name: Build APK (arm64 split) | |
| run: flutter build apk --release --target-platform android-arm64 --split-per-abi | |
| - name: Rename APK | |
| run: | | |
| if [ -f build/app/outputs/flutter-apk/app-arm64-v8a-release.apk ]; then | |
| mv build/app/outputs/flutter-apk/app-arm64-v8a-release.apk codewalk-android-arm64.apk | |
| elif [ -f build/app/outputs/flutter-apk/app-release.apk ]; then | |
| mv build/app/outputs/flutter-apk/app-release.apk codewalk-android-arm64.apk | |
| else | |
| echo "Expected Android APK output was not found." | |
| ls -la build/app/outputs/flutter-apk || true | |
| exit 1 | |
| fi | |
| - name: Upload Android artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: codewalk-android | |
| path: codewalk-android-arm64.apk | |
| retention-days: 2 | |
| create-release: | |
| runs-on: ubuntu-latest | |
| needs: [build-linux, build-windows, build-macos, build-android] | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts/ | |
| - name: List artifacts | |
| run: find artifacts/ -type f | |
| - name: Prepare release notes | |
| run: | | |
| version="${GITHUB_REF_NAME#v}" | |
| python3 tool/release/changelog.py extract "$version" --output release-notes.md | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| artifacts/codewalk-linux-x64/codewalk-linux-x64.tar.gz | |
| artifacts/codewalk-windows-x64/codewalk-windows-x64.zip | |
| artifacts/codewalk-macos-arm64/codewalk-macos-arm64.tar.gz | |
| artifacts/codewalk-android/codewalk-android-arm64.apk | |
| body_path: release-notes.md | |
| generate_release_notes: true | |
| draft: false | |
| prerelease: false |