diff --git a/.github/workflows/plan-release.yml b/.github/workflows/plan-release.yml index 643e3023..b2843ad3 100644 --- a/.github/workflows/plan-release.yml +++ b/.github/workflows/plan-release.yml @@ -15,77 +15,44 @@ concurrency: cancel-in-progress: true jobs: - is-this-a-release: - name: "Is this a release?" + should-run-release-plan-prepare: + name: Should we run release-plan prepare? runs-on: ubuntu-latest outputs: - command: ${{ steps.check-release.outputs.command }} - + should-prepare: ${{ steps.should-prepare.outputs.should-prepare }} steps: - - uses: actions/checkout@v6 + - uses: release-plan/actions/should-prepare-release@v1 with: - fetch-depth: 2 ref: 'main' - # This will only cause the `is-this-a-release` 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 + id: should-prepare create-prepare-release-pr: name: Create Prepare Release PR runs-on: ubuntu-latest timeout-minutes: 5 - needs: is-this-a-release + needs: should-run-release-plan-prepare permissions: contents: write issues: read pull-requests: write - # only run on push event or workflow dispatch 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' || github.event_name == 'workflow_dispatch') && needs.is-this-a-release.outputs.command != 'release') || (github.event_name == 'pull_request_target' && github.event.pull_request.merged == true) - + if: needs.should-run-release-plan-prepare.outputs.should-prepare == 'true' steps: - - uses: actions/checkout@v6 - # We need to download lots of history so that - # github-changelog can discover what's changed since the last release + - uses: release-plan/actions/prepare@v1 + name: Run release-plan prepare with: - fetch-depth: 0 ref: 'main' - - uses: pnpm/action-setup@v4 - - uses: actions/setup-node@v6 - with: - node-version: 24 - cache: pnpm - - run: pnpm install --frozen-lockfile - - name: "Generate Explanation and Prep Changelogs" - id: explanation - run: | - set +e - pnpm release-plan prepare 2> >(tee -a release-plan-stderr.txt >&2) - - if [ $? -ne 0 ]; then - release_plan_output=$(cat release-plan-stderr.txt) - else - release_plan_output=$(jq .description .release-plan.json -r) - rm release-plan-stderr.txt - - if [ $(jq '.solution | length' .release-plan.json) -eq 1 ]; then - new_version=$(jq -r '.solution[].newVersion' .release-plan.json) - echo "new_version=v$new_version" >> $GITHUB_OUTPUT - fi - fi - echo 'text<> $GITHUB_OUTPUT - echo "$release_plan_output" >> $GITHUB_OUTPUT - echo 'EOF' >> $GITHUB_OUTPUT env: GITHUB_AUTH: ${{ secrets.GITHUB_TOKEN }} + id: explanation - uses: peter-evans/create-pull-request@v8 + name: Create Prepare Release PR with: - commit-message: "Prepare Release ${{ steps.explanation.outputs.new_version}} using 'release-plan'" + commit-message: "Prepare Release ${{ steps.explanation.outputs.new-version}} using 'release-plan'" labels: "internal" + sign-commits: true branch: release-preview - title: Prepare Release ${{ steps.explanation.outputs.new_version }} + title: Prepare Release ${{ steps.explanation.outputs.new-version }} 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 👍 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 1560b557..77725c0b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -22,17 +22,15 @@ jobs: runs-on: ubuntu-latest permissions: contents: write - pull-requests: write id-token: write attestations: write steps: - uses: actions/checkout@v6 - - uses: pnpm/action-setup@v4 + - uses: pnpm/action-setup@v5 - uses: actions/setup-node@v6 with: node-version: 24 - # This creates an .npmrc that reads the NODE_AUTH_TOKEN environment variable registry-url: 'https://registry.npmjs.org' cache: pnpm - run: pnpm install --frozen-lockfile @@ -40,4 +38,3 @@ jobs: run: NPM_CONFIG_PROVENANCE=true pnpm release-plan publish env: GITHUB_AUTH: ${{ secrets.GITHUB_TOKEN }} - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/package.json b/package.json index a1717750..28c73751 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "concurrently": "^9.0.1", "prettier": "^3.0.3", "prettier-plugin-ember-template-tag": "^2.0.0", - "release-plan": "^0.16.0" + "release-plan": "^0.18.0" }, "packageManager": "pnpm@9.15.9", "engines": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 744157ea..43ab9964 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -33,8 +33,8 @@ importers: specifier: ^2.0.0 version: 2.1.2(prettier@3.7.4) release-plan: - specifier: ^0.16.0 - version: 0.16.0 + specifier: ^0.18.0 + version: 0.18.0 packages: @@ -549,8 +549,8 @@ packages: resolution: {integrity: sha512-kVCxPF3vQM/N0B1PmoqVUqgHP+EeVjmZSQn+1oCRPxd2P21P2F19lIgbR3HBosbB1PUhOAoctJnfEn2GbN2eZA==} engines: {node: '>=18'} - github-changelog@2.1.2: - resolution: {integrity: sha512-psDEGxwD5fWDLOW+BOORg1JgZOnbCuMhNLevsD/nP7QVXEVExUGnXBP6MmrFm0hAao9LgBLSBKfcNzGuwecRDA==} + github-changelog@2.1.4: + resolution: {integrity: sha512-mZQF/YC9OR8XMGpYlLQqG66RiKwlaQZ7rXTZug28oOYkzOXd0acszuvYHVzPlYmns1aDDSwQkbzFxNOYpWhmig==} engines: {node: 18.* || 20.* || >= 22} hasBin: true @@ -560,11 +560,12 @@ packages: glob@10.5.0: resolution: {integrity: sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==} + deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me hasBin: true glob@7.2.3: resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} - deprecated: Glob versions prior to v9 are no longer supported + deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me graceful-fs@4.2.10: resolution: {integrity: sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==} @@ -967,8 +968,8 @@ packages: resolution: {integrity: sha512-+crtS5QjFRqFCoQmvGduwYWEBng99ZvmFvF+cUJkGYF1L1BfU8C6Zp9T7f5vPAwyLkUExpvK+ANVZmGU49qi4Q==} engines: {node: '>=12'} - release-plan@0.16.0: - resolution: {integrity: sha512-S2hrXACiy39LenrdvPAhSY7PcitS4A4fAxlzoPgYyCiS2OU6Ed+cUKvN4h9/uRyZ/B3AMGywZUIPtIhCUIjTng==} + release-plan@0.18.0: + resolution: {integrity: sha512-WzP+O+XRF4AqhTDQK84FovY+TxHyC8J7QWoOwxnrvVjyHns417l1FUldboRhBYua5Pej6Yg/2jH1dEH2MRNHeA==} hasBin: true request-light@0.7.0: @@ -1101,6 +1102,7 @@ packages: tar@6.2.1: resolution: {integrity: sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==} engines: {node: '>=10'} + deprecated: Old versions of tar are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me thenify-all@1.6.0: resolution: {integrity: sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==} @@ -1915,7 +1917,7 @@ snapshots: '@sec-ant/readable-stream': 0.4.1 is-stream: 4.0.1 - github-changelog@2.1.2: + github-changelog@2.1.4: dependencies: '@manypkg/get-packages': 2.2.2 chalk: 4.1.2 @@ -2310,7 +2312,7 @@ snapshots: dependencies: rc: 1.2.8 - release-plan@0.16.0: + release-plan@0.18.0: dependencies: '@manypkg/get-packages': 2.2.2 '@npmcli/package-json': 6.2.0 @@ -2320,7 +2322,7 @@ snapshots: cli-highlight: 2.1.11 execa: 9.6.1 fs-extra: 11.3.3 - github-changelog: 2.1.2 + github-changelog: 2.1.4 js-yaml: 4.1.1 latest-version: 9.0.0 parse-github-repo-url: 1.4.1