-
Notifications
You must be signed in to change notification settings - Fork 169
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #624 from adopted-ember-addons/bump-release-plan
Bump release-plan and update setup
- Loading branch information
Showing
5 changed files
with
150 additions
and
261 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,17 +4,18 @@ on: | |
branches: | ||
- main | ||
- master | ||
pull_request: | ||
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 # only the latest one of these should ever be running | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
check-plan: | ||
name: 'Check Release Plan' | ||
name: "Check Release Plan" | ||
runs-on: ubuntu-latest | ||
outputs: | ||
command: ${{ steps.check-release.outputs.command }} | ||
|
@@ -36,44 +37,49 @@ jobs: | |
needs: check-plan | ||
permissions: | ||
contents: write | ||
issues: read | ||
pull-requests: write | ||
outputs: | ||
explanation: ${{ steps.explanation.outputs.text }} | ||
# only run on push event if plan wasn't updated (don't create a release plan when we're releasing) | ||
# only run on labeled event if the PR has already been merged | ||
if: (github.event_name == 'push' && needs.check-plan.outputs.command != 'release') || (github.event_name == 'pull_request' && github.event.pull_request.merged == true) | ||
if: (github.event_name == 'push' && needs.check-plan.outputs.command != 'release') || (github.event_name == 'pull_request_target' && github.event.pull_request.merged == true) | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
# We need to download lots of history so that | ||
# lerna-changelog can discover what's changed since the last release | ||
# github-changelog can discover what's changed since the last release | ||
with: | ||
fetch-depth: 0 | ||
ref: 'master' | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.x | ||
|
||
node-version: 18 | ||
- uses: pnpm/action-setup@v4 | ||
- run: pnpm install --frozen-lockfile | ||
|
||
- name: 'Generate Explanation and Prep Changelogs' | ||
- name: "Generate Explanation and Prep Changelogs" | ||
id: explanation | ||
run: | | ||
set -x | ||
pnpm release-plan prepare | ||
set +e | ||
pnpm release-plan prepare 2> >(tee -a release-plan-stderr.txt >&2) | ||
echo 'text<<EOF' >> $GITHUB_OUTPUT | ||
jq .description .release-plan.json -r >> $GITHUB_OUTPUT | ||
echo 'EOF' >> $GITHUB_OUTPUT | ||
if [ $? -ne 0 ]; then | ||
echo 'text<<EOF' >> $GITHUB_OUTPUT | ||
cat release-plan-stderr.txt >> $GITHUB_OUTPUT | ||
echo 'EOF' >> $GITHUB_OUTPUT | ||
else | ||
echo 'text<<EOF' >> $GITHUB_OUTPUT | ||
jq .description .release-plan.json -r >> $GITHUB_OUTPUT | ||
echo 'EOF' >> $GITHUB_OUTPUT | ||
rm release-plan-stderr.txt | ||
fi | ||
env: | ||
GITHUB_AUTH: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- uses: peter-evans/create-pull-request@v5 | ||
- uses: peter-evans/create-pull-request@v6 | ||
with: | ||
commit-message: "Prepare Release using 'release-plan'" | ||
author: 'github-actions[bot] <[email protected]>' | ||
labels: 'internal' | ||
labels: "internal" | ||
branch: release-preview | ||
title: Prepare Release | ||
body: | | ||
|
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.