-
-
Notifications
You must be signed in to change notification settings - Fork 94
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 #374 from mansona/update-release-plan
update release-plan
- Loading branch information
Showing
5 changed files
with
283 additions
and
300 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 |
---|---|---|
|
@@ -3,21 +3,45 @@ on: | |
push: | ||
branches: | ||
- main | ||
- master | ||
pull_request: | ||
types: | ||
- labeled | ||
|
||
concurrency: | ||
group: plan-release-${{ github.head_ref || github.ref }} | ||
group: plan-release # only the latest one of these should ever be running | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
check-plan: | ||
name: "Check Release Plan" | ||
runs-on: ubuntu-latest | ||
outputs: | ||
command: ${{ steps.check-release.outputs.command }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
ref: 'main' | ||
# This will only cause the `check-plan` job to have a "command" of `release` | ||
# when the .release-plan.json file was changed on the last commit. | ||
- id: check-release | ||
run: if git diff --name-only HEAD HEAD~1 | grep -w -q ".release-plan.json"; then echo "command=release"; fi >> $GITHUB_OUTPUT | ||
|
||
prepare_release_notes: | ||
name: Prepare Release Notes | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
needs: check-plan | ||
permissions: | ||
contents: write | ||
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) | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
@@ -39,7 +63,7 @@ jobs: | |
run: | | ||
set -x | ||
pnpm release-plan prepare --singlePackage=ember-cli-notifications | ||
pnpm release-plan prepare | ||
echo 'text<<EOF' >> $GITHUB_OUTPUT | ||
jq .description .release-plan.json -r >> $GITHUB_OUTPUT | ||
|
@@ -53,7 +77,7 @@ jobs: | |
author: "github-actions[bot] <[email protected]>" | ||
labels: "internal" | ||
branch: release-preview | ||
title: Release Preview | ||
title: Prepare Release | ||
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 👍 | ||
|
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.