diff --git a/.github/workflows/plan-release.yml b/.github/workflows/plan-release.yml index c3f5b160..b2843ad3 100644 --- a/.github/workflows/plan-release.yml +++ b/.github/workflows/plan-release.yml @@ -4,6 +4,7 @@ on: push: branches: - main + - master 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 @@ -14,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@v4 + - 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@v4 - # 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@v4 - with: - node-version: 18 - 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@v7 + - 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 c02d0a4e..531161e9 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -22,22 +22,20 @@ jobs: runs-on: ubuntu-latest permissions: contents: write - pull-requests: write id-token: write attestations: write steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - uses: pnpm/action-setup@v4 - - uses: actions/setup-node@v4 + - uses: actions/setup-node@v6 with: - node-version: 18 - # This creates an .npmrc that reads the NODE_AUTH_TOKEN environment variable + node-version: 22 registry-url: 'https://registry.npmjs.org' cache: pnpm + - run: npm install -g npm@latest # ensure that the globally installed npm is new enough to support OIDC - run: pnpm install --frozen-lockfile - name: Publish to NPM run: NPM_CONFIG_PROVENANCE=true pnpm release-plan publish env: GITHUB_AUTH: ${{ secrets.GITHUB_TOKEN }} - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.release-plan.json b/.release-plan.json index 990cc06f..a7ed62ad 100644 --- a/.release-plan.json +++ b/.release-plan.json @@ -22,5 +22,5 @@ "pkgJSONPath": "./vertical-collection/package.json" } }, - "description": "## Release (2026-01-24)\n\n* @html-next/vertical-collection 5.0.0 (major)\n\n#### :boom: Breaking Change\n* `@html-next/vertical-collection`\n * [#511](https://github.com/html-next/vertical-collection/pull/511) V2 Addon Conversion ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n * [#444](https://github.com/html-next/vertical-collection/pull/444) Use co-located components instead of pods ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n* Other\n * [#402](https://github.com/html-next/vertical-collection/pull/402) Ember v3.28.0...v5.2.0 ([@mixonic](https://github.com/mixonic))\n\n#### :bug: Bug Fix\n* `@html-next/vertical-collection`\n * [#479](https://github.com/html-next/vertical-collection/pull/479) Fix for #296: Insert the virtual component bound back to DOM also for the case `shouldRecycle=false` ([@johanrd](https://github.com/johanrd))\n * [#491](https://github.com/html-next/vertical-collection/pull/491) Fix occluded-content height inflation from inherited line-height ([@johanrd](https://github.com/johanrd))\n * [#482](https://github.com/html-next/vertical-collection/pull/482) Add defensive checks for cases where maxHeight is empty string ([@johanrd](https://github.com/johanrd))\n * [#466](https://github.com/html-next/vertical-collection/pull/466) Fix incorrect polling start ([@monovertex](https://github.com/monovertex))\n * [#443](https://github.com/html-next/vertical-collection/pull/443) Remove unneeded peer declaration ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n\n#### :house: Internal\n* `@html-next/vertical-collection`\n * [#512](https://github.com/html-next/vertical-collection/pull/512) Migrate and fix all ESLint issues. All lint configs are ESM now ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n * [#490](https://github.com/html-next/vertical-collection/pull/490) Move tests to test-app ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n * [#510](https://github.com/html-next/vertical-collection/pull/510) Upgrade some internal deps ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n * [#475](https://github.com/html-next/vertical-collection/pull/475) Convert to gjs ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n * [#459](https://github.com/html-next/vertical-collection/pull/459) Remove V1 Add complexity in the index.js ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n * [#452](https://github.com/html-next/vertical-collection/pull/452) Setup Release plan ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n * [#451](https://github.com/html-next/vertical-collection/pull/451) Configure the prettier commands in package.json ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n * [#441](https://github.com/html-next/vertical-collection/pull/441) Convert to monorepo ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n* Other\n * [#489](https://github.com/html-next/vertical-collection/pull/489) test-app boilerplate ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n * [#438](https://github.com/html-next/vertical-collection/pull/438) Move to pnpm ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n * [#414](https://github.com/html-next/vertical-collection/pull/414) Vertical collection tests compatible with Ember 6 ([@mixonic](https://github.com/mixonic))\n * [#408](https://github.com/html-next/vertical-collection/pull/408) Bump dev Node to v18, reroll lockfile ([@mixonic](https://github.com/mixonic))\n * [#407](https://github.com/html-next/vertical-collection/pull/407) Add dependabot ([@mixonic](https://github.com/mixonic))\n * [#402](https://github.com/html-next/vertical-collection/pull/402) Ember v3.28.0...v5.2.0 ([@mixonic](https://github.com/mixonic))\n\n#### Committers: 4\n- Cosmin Stamate ([@monovertex](https://github.com/monovertex))\n- Matthew Beale ([@mixonic](https://github.com/mixonic))\n- [@NullVoxPopuli](https://github.com/NullVoxPopuli)\n- [@johanrd](https://github.com/johanrd)\n" + "description": "## Release (2026-01-24)\n \n* @html-next/vertical-collection 5.0.0 (major)\n\n#### :boom: Breaking Change\n* `@html-next/vertical-collection`\n * [#511](https://github.com/html-next/vertical-collection/pull/511) V2 Addon Conversion ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n * [#444](https://github.com/html-next/vertical-collection/pull/444) Use co-located components instead of pods ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n* Other\n * [#402](https://github.com/html-next/vertical-collection/pull/402) Ember v3.28.0...v5.2.0 ([@mixonic](https://github.com/mixonic))\n\n#### :bug: Bug Fix\n* `@html-next/vertical-collection`\n * [#479](https://github.com/html-next/vertical-collection/pull/479) Fix for #296: Insert the virtual component bound back to DOM also for the case `shouldRecycle=false` ([@johanrd](https://github.com/johanrd))\n * [#491](https://github.com/html-next/vertical-collection/pull/491) Fix occluded-content height inflation from inherited line-height ([@johanrd](https://github.com/johanrd))\n * [#482](https://github.com/html-next/vertical-collection/pull/482) Add defensive checks for cases where maxHeight is empty string ([@johanrd](https://github.com/johanrd))\n * [#466](https://github.com/html-next/vertical-collection/pull/466) Fix incorrect polling start ([@monovertex](https://github.com/monovertex))\n * [#443](https://github.com/html-next/vertical-collection/pull/443) Remove unneeded peer declaration ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n\n#### :house: Internal\n* `@html-next/vertical-collection`\n * [#512](https://github.com/html-next/vertical-collection/pull/512) Migrate and fix all ESLint issues. All lint configs are ESM now ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n * [#490](https://github.com/html-next/vertical-collection/pull/490) Move tests to test-app ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n * [#510](https://github.com/html-next/vertical-collection/pull/510) Upgrade some internal deps ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n * [#475](https://github.com/html-next/vertical-collection/pull/475) Convert to gjs ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n * [#459](https://github.com/html-next/vertical-collection/pull/459) Remove V1 Add complexity in the index.js ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n * [#452](https://github.com/html-next/vertical-collection/pull/452) Setup Release plan ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n * [#451](https://github.com/html-next/vertical-collection/pull/451) Configure the prettier commands in package.json ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n * [#441](https://github.com/html-next/vertical-collection/pull/441) Convert to monorepo ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n* Other\n * [#489](https://github.com/html-next/vertical-collection/pull/489) test-app boilerplate ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n * [#438](https://github.com/html-next/vertical-collection/pull/438) Move to pnpm ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n * [#414](https://github.com/html-next/vertical-collection/pull/414) Vertical collection tests compatible with Ember 6 ([@mixonic](https://github.com/mixonic))\n * [#408](https://github.com/html-next/vertical-collection/pull/408) Bump dev Node to v18, reroll lockfile ([@mixonic](https://github.com/mixonic))\n * [#407](https://github.com/html-next/vertical-collection/pull/407) Add dependabot ([@mixonic](https://github.com/mixonic))\n * [#402](https://github.com/html-next/vertical-collection/pull/402) Ember v3.28.0...v5.2.0 ([@mixonic](https://github.com/mixonic))\n\n#### Committers: 4\n- Cosmin Stamate ([@monovertex](https://github.com/monovertex))\n- Matthew Beale ([@mixonic](https://github.com/mixonic))\n- [@NullVoxPopuli](https://github.com/NullVoxPopuli)\n- [@johanrd](https://github.com/johanrd)\n" } diff --git a/package.json b/package.json index 282b83e1..02f65185 100644 --- a/package.json +++ b/package.json @@ -7,14 +7,14 @@ "url": "git@github.com:html-next/vertical-collection.git" }, "scripts": { - "update:snippets": "node ./scripts/write-snippets.mjs", "build": "pnpm --filter '*' build", "lint": "pnpm --filter '*' lint", "lint:fix": "pnpm --filter '*' lint:fix", - "test:ci": "ls -la ; pnpm --filter '*' test:ci" + "test:ci": "ls -la ; pnpm --filter '*' test:ci", + "update:snippets": "node ./scripts/write-snippets.mjs" }, "devDependencies": { - "release-plan": "^0.16.0" + "release-plan": "^0.17.4" }, "packageManager": "pnpm@10.10.0", "volta": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b7a611ed..7f5e0e65 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -11,8 +11,8 @@ importers: .: devDependencies: release-plan: - specifier: ^0.16.0 - version: 0.16.0 + specifier: ^0.17.4 + version: 0.17.4 test-app: dependencies: @@ -6154,8 +6154,8 @@ packages: resolution: {integrity: sha512-NZQZdC5wOE/H3UT28fVGL+ikOZcEzfMGk/c3iN9UGxzWHMa1op7274oyiUVrAG4B2EuFhus8SvkaYnhvW92p9Q==} hasBin: true - release-plan@0.16.0: - resolution: {integrity: sha512-S2hrXACiy39LenrdvPAhSY7PcitS4A4fAxlzoPgYyCiS2OU6Ed+cUKvN4h9/uRyZ/B3AMGywZUIPtIhCUIjTng==} + release-plan@0.17.4: + resolution: {integrity: sha512-CK+RrsvP6JXysgFuqUoOvprAT95J5x8usHzAQh3M1RMQqFScnAyfY6lb1LBsjqW/HUsvLjkLfSp8dJseRHEpEw==} hasBin: true remote-git-tags@3.0.0: @@ -6839,6 +6839,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 exhorbitant rates) by contacting i@izs.me temp-dir@2.0.0: resolution: {integrity: sha512-aoBAniQmmwtcKp/7BzsH8Cxzv8OL736p7v1ihGb5e9DJ9kTwGWHrQrVB5+lfVDzfGrdRzXch+ig7LHaY1JTOrg==} @@ -14857,7 +14858,7 @@ snapshots: dependencies: jsesc: 3.1.0 - release-plan@0.16.0: + release-plan@0.17.4: dependencies: '@manypkg/get-packages': 2.2.2 '@npmcli/package-json': 6.2.0