MoveTopia Update Changelog #66
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: "PR Check - Build Only" | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| - development | |
| workflow_dispatch: | |
| jobs: | |
| check-skip-conditions: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| skip-build: ${{ steps.check-labels.outputs.skip_build }} | |
| steps: | |
| - name: Check PR labels | |
| id: check-labels | |
| uses: actions/github-script@v6 | |
| with: | |
| script: | | |
| const labels = context.payload.pull_request?.labels || []; | |
| const skipLabels = ['docs-only', 'no-build']; | |
| const shouldSkip = labels.some(label => skipLabels.includes(label.name)); | |
| console.log(`Labels: ${labels.map(l => l.name).join(', ')}`); | |
| console.log(`Should skip build: ${shouldSkip}`); | |
| core.setOutput('skip_build', shouldSkip.toString()); | |
| result-encoding: string | |
| build-check: | |
| name: "Build Check" | |
| needs: check-skip-conditions | |
| if: ${{ needs.check-skip-conditions.outputs.skip-build == 'false' }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: "Checkout repository" | |
| uses: actions/checkout@v4 | |
| - name: "Set up Java" | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: "oracle" | |
| java-version: "22" | |
| - name: "Set up Gradle" | |
| uses: gradle/actions/setup-gradle@v3 | |
| with: | |
| gradle-version: wrapper | |
| - name: "Set up Flutter" | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| channel: stable | |
| flutter-version-file: pubspec.yaml | |
| cache: true | |
| - name: "Setup Ruby" | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: '3.1' | |
| working-directory: 'android' | |
| bundler-cache: true | |
| - name: "Run Fastlane Debug Build" | |
| id: fastlane | |
| uses: maierj/fastlane-action@v3.1.0 | |
| with: | |
| lane: build_debug | |
| subdirectory: android | |
| env: | |
| GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
| - name: "Build Status" | |
| run: echo "Debug build completed - PR check passed!" |