Merge pull request #274 from google/oidc_dev #9
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: goreleaser | |
| on: | |
| push: | |
| # run only against tags | |
| tags: | |
| - "*" | |
| permissions: | |
| contents: write | |
| packages: write | |
| jobs: | |
| goreleaser: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Set up Go | |
| uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5 | |
| with: | |
| go-version: stable | |
| cache: false | |
| - name: Set up Java | |
| uses: actions/setup-java@0f481fcb613427c0f801b606911222b5b6f3083a # v5.5.0 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '17' | |
| - name: Set up Android NDK | |
| run: | | |
| yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses | |
| $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "ndk;26.1.10909125" | |
| - name: Set up Flutter | |
| uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2 # v2 | |
| with: | |
| channel: 'stable' | |
| - name: Build Mobile App | |
| env: | |
| GOOGLE_SERVICES_JSON_BASE64: ${{ secrets.GOOGLE_SERVICES_JSON_BASE64 }} | |
| GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }} | |
| run: make mobile-app-apk | |
| - name: Restore files rewritten by the Flutter build | |
| # `flutter build` re-resolves pubspec.lock (and may rewrite | |
| # analysis_options.yaml), leaving the tree dirty and failing | |
| # GoReleaser's git state validation. Build outputs are untracked, so | |
| # restoring tracked files keeps the APK available for the upload step. | |
| run: | | |
| git -C mobile/sam-node-app checkout -- . | |
| git status --porcelain | |
| - name: Run GoReleaser | |
| uses: goreleaser/goreleaser-action@f06c13b6b1a9625abc9e6e439d9c05a8f2190e94 # v7.2.3 | |
| with: | |
| distribution: goreleaser | |
| version: "~> v2" | |
| args: release --clean | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Upload Mobile App to Release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| GH_REPO: ${{ github.repository }} | |
| TAG_NAME: ${{ github.ref_name }} | |
| run: gh release upload "$TAG_NAME" mobile/sam-node-app/build/app/outputs/flutter-apk/app-release.apk --clobber |