This repository was archived by the owner on Jul 2, 2026. It is now read-only.
Scope admin configuration changes to the target configuration #219
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: | |
| pull_request: | |
| branches: | |
| - main | |
| types: | |
| - closed | |
| jobs: | |
| verify-run: | |
| runs-on: ubuntu-latest | |
| # We run release action only if: | |
| # 1. PR comes from internal branch (i.e. not a fork) | |
| # 2. PR is merged (a PR can be closed but not merged) | |
| # 3. PR branch name begins with "release/" | |
| if: | | |
| github.event.pull_request.head.repo.full_name == github.repository && | |
| github.event.pull_request.merged == true && | |
| startsWith(github.event.pull_request.head.ref, 'release/') | |
| outputs: | |
| version: ${{ steps.version.outputs.result }} | |
| is-prerelease: ${{ contains(steps.version.outputs.result, 'next') }} | |
| steps: | |
| - name: extract-version | |
| id: version | |
| uses: actions/github-script@0.2.0 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| script: | | |
| return context.payload.pull_request.title.replace(/release\: /, ''); | |
| prerelease: | |
| needs: verify-run | |
| permissions: | |
| id-token: write | |
| contents: write | |
| uses: ./.github/workflows/release-env.yml | |
| secrets: inherit | |
| with: | |
| env: next | |
| version: ${{ needs.verify-run.outputs.version }} | |
| is-prerelease: true | |
| release: | |
| needs: [verify-run, prerelease] | |
| if: ${{ fromJSON(needs.verify-run.outputs.is-prerelease) == false }} | |
| permissions: | |
| id-token: write | |
| contents: write | |
| uses: ./.github/workflows/release-env.yml | |
| secrets: inherit | |
| with: | |
| env: main | |
| version: ${{ needs.verify-run.outputs.version }} | |
| is-prerelease: false |