Prepare Alpha Release #222
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: Plan Stable Release | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - release | |
| pull_request_target: # This workflow has permissions on the repo, do NOT run code from PRs in this workflow. See https://securitylab.github.com/research/github-actions-preventing-pwn-requests/ | |
| types: | |
| - labeled | |
| - unlabeled | |
| concurrency: | |
| group: plan-release-stable # only the latest one of these should ever be running | |
| cancel-in-progress: true | |
| jobs: | |
| should-run-release-plan-prepare: | |
| name: Should we run release-plan prepare? | |
| runs-on: ubuntu-latest | |
| outputs: | |
| should-prepare: ${{ steps.should-prepare.outputs.should-prepare }} | |
| steps: | |
| - uses: release-plan/actions/should-prepare-release@v1 | |
| with: | |
| ref: "release" | |
| id: should-prepare | |
| create-prepare-release-pr: | |
| name: Create Prepare Release PR | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| needs: should-run-release-plan-prepare | |
| permissions: | |
| contents: write | |
| issues: read | |
| pull-requests: write | |
| if: needs.should-run-release-plan-prepare.outputs.should-prepare == 'true' | |
| steps: | |
| - uses: release-plan/actions/prepare@v1 | |
| name: Run release-plan prepare | |
| with: | |
| ref: "release" | |
| env: | |
| GITHUB_AUTH: ${{ secrets.GITHUB_TOKEN }} | |
| id: explanation | |
| # this is needed because our fixtures are highly dependent on the exact version of ember-cli in the monorepo | |
| # and release-plan updates the version during the plan phase | |
| - name: "Update blueprint to use new ember-cli version" | |
| # if you're planning to test this locally and you're on a mac then you should use `gsed` because bsd sed has different | |
| # arguments. You can install gsed with `brew install gnu-sed` | |
| run: | | |
| sed -i 's/"ember-cli".*/"ember-cli": "~'$(jq -r .version package.json)'",/' packages/app-blueprint/files/package.json | |
| - uses: peter-evans/create-pull-request@v8 | |
| name: Create Prepare Release PR | |
| with: | |
| commit-message: "Prepare Stable Release ${{ steps.explanation.outputs.new-version}} using 'release-plan'" | |
| labels: "internal" | |
| sign-commits: true | |
| branch: release-preview-stable | |
| title: Prepare Stable Release ${{ steps.explanation.outputs.new-version }} | |
| # this doesn't use secrets.GITHUB_TOKEN because we want CI to run on the PR that it opens. | |
| # See: https://docs.github.com/en/actions/how-tos/security-for-github-actions/security-guides/automatic-token-authentication#using-the-github_token-in-a-workflow | |
| token: ${{ secrets.RELEASE_PLAN_GH_PAT }} | |
| body: | | |
| This PR is a preview of the release that [release-plan](https://github.com/embroider-build/release-plan) has prepared. To release you should just merge this PR 👍 | |
| ----------------------------------------- | |
| ${{ steps.explanation.outputs.text }} |