feat(auth): Add support for FPNV #877
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
| # Copyright 2020 Google LLC | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software | |
| # distributed under the License is distributed on an "AS IS" BASIS, | |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| # See the License for the specific language governing permissions and | |
| # limitations under the License. | |
| name: Release Candidate | |
| on: | |
| # Only run the workflow when a PR is updated or when a developer explicitly requests | |
| # a build by sending a 'firebase_build' event. | |
| pull_request: | |
| types: [opened, synchronize, closed] | |
| repository_dispatch: | |
| types: | |
| - firebase_build | |
| jobs: | |
| stage_release: | |
| # To publish a release, merge the release PR with the label 'release:publish'. | |
| # To stage a release without publishing it, send a 'firebase_build' event or apply | |
| # the 'release:stage' label to a PR. | |
| if: github.event.action == 'firebase_build' || | |
| contains(github.event.pull_request.labels.*.name, 'release:stage') || | |
| (github.event.pull_request.merged && | |
| contains(github.event.pull_request.labels.*.name, 'release:publish')) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 | |
| - name: Set up Go | |
| uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 | |
| with: | |
| go-version: '1.23' | |
| - name: Install golint | |
| run: go install golang.org/x/lint/golint@latest | |
| - name: Run Linter | |
| run: | | |
| golint -set_exit_status ./... | |
| - name: Run Tests | |
| run: ./.github/scripts/run_all_tests.sh | |
| env: | |
| FIREBASE_SERVICE_ACCT_KEY: ${{ secrets.FIREBASE_SERVICE_ACCT_KEY }} | |
| FIREBASE_API_KEY: ${{ secrets.FIREBASE_API_KEY }} | |
| publish_release: | |
| needs: stage_release | |
| # Check whether the release should be published. We publish only when the trigger PR is | |
| # 1. merged | |
| # 2. to the dev branch | |
| # 3. with the label 'release:publish', and | |
| # 4. the title prefix '[chore] Release '. | |
| if: github.event.pull_request.merged && | |
| github.base_ref == 'dev' && | |
| contains(github.event.pull_request.labels.*.name, 'release:publish') && | |
| startsWith(github.event.pull_request.title, '[chore] Release ') | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pull-requests: write | |
| steps: | |
| - name: Checkout source for publish | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 | |
| with: | |
| ref: dev | |
| persist-credentials: false | |
| - name: Publish preflight check | |
| id: preflight | |
| run: ./.github/scripts/publish_preflight_check.sh | |
| # Create a PR to merge dev into master. | |
| - name: Create Release PR | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| RELEASE_BODY: ${{ steps.preflight.outputs.changelog }} | |
| RELEASE_TITLE: "[chore] Release ${{ steps.preflight.outputs.version }}" | |
| run: | | |
| gh pr create \ | |
| --base master \ | |
| --head dev \ | |
| --title "$RELEASE_TITLE" \ | |
| --body "$RELEASE_BODY" |