diff --git a/.github/workflows/plan-release.yml b/.github/workflows/plan-release.yml index 770f8fe7..2f51915c 100644 --- a/.github/workflows/plan-release.yml +++ b/.github/workflows/plan-release.yml @@ -5,7 +5,7 @@ on: - main - master pull_request: - types: + types: - labeled concurrency: @@ -34,6 +34,9 @@ jobs: 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) @@ -43,14 +46,15 @@ jobs: 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: 'main' - uses: actions/setup-node@v4 with: node-version: 18 - - uses: pnpm/action-setup@v2 + - uses: pnpm/action-setup@v3 with: version: 8 - run: pnpm install --frozen-lockfile @@ -58,20 +62,26 @@ jobs: - name: "Generate Explanation and Prep Changelogs" id: explanation run: | - set -x + set +e - pnpm release-plan prepare + pnpm release-plan prepare 2> >(tee -a stderr.log >&2) - echo 'text<> $GITHUB_OUTPUT - jq .description .release-plan.json -r >> $GITHUB_OUTPUT - echo 'EOF' >> $GITHUB_OUTPUT + + if [ $? -ne 0 ]; then + echo 'text<> $GITHUB_OUTPUT + cat stderr.log >> $GITHUB_OUTPUT + echo 'EOF' >> $GITHUB_OUTPUT + else + echo 'text<> $GITHUB_OUTPUT + jq .description .release-plan.json -r >> $GITHUB_OUTPUT + echo 'EOF' >> $GITHUB_OUTPUT + 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] " labels: "internal" branch: release-preview title: Prepare Release @@ -80,4 +90,4 @@ jobs: ----------------------------------------- - ${{ steps.explanation.outputs.text }} \ No newline at end of file + ${{ steps.explanation.outputs.text }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 985465ff..2b7acc15 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,6 +1,6 @@ # For every push to the master branch, this checks if the release-plan was # updated and if it was it will publish stable npm packages based on the -# release plan +# release plan name: Publish Stable @@ -38,6 +38,9 @@ jobs: runs-on: ubuntu-latest needs: check-plan if: needs.check-plan.outputs.command == 'release' + permissions: + contents: write + pull-requests: write steps: - uses: actions/checkout@v4 @@ -47,7 +50,7 @@ jobs: # This creates an .npmrc that reads the NODE_AUTH_TOKEN environment variable registry-url: 'https://registry.npmjs.org' - - uses: pnpm/action-setup@v2 + - uses: pnpm/action-setup@v3 with: version: 8 - run: pnpm install --frozen-lockfile @@ -56,4 +59,4 @@ jobs: env: GITHUB_AUTH: ${{ secrets.GITHUB_TOKEN }} - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/RELEASE.md b/RELEASE.md index e4f92604..76086738 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -1,6 +1,6 @@ # Release Process -Releases in this repo are mostly automated using [release-plan](https://github.com/embroider-build/release-plan/). Once you label all your PRs correctly (see below) you will have an automatically generated PR that updates your CHANGELOG.md file and a `.release-plan.json` that is used prepare the release once the PR is merged. +Releases in this repo are mostly automated using [release-plan](https://github.com/embroider-build/release-plan/). Once you label all your PRs correctly (see below) you will have an automatically generated PR that updates your CHANGELOG.md file and a `.release-plan.json` that is used to prepare the release once the PR is merged. ## Preparation diff --git a/package.json b/package.json index 1781b4f7..886abd1b 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "@typescript-eslint/parser": "^6.4.0", "eslint": "^8.19.0", "prettier": "^3.0.2", - "release-plan": "^0.5.1", + "release-plan": "^0.8.0", "typescript": "^4.7.4" }, "engines": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 97d48a61..38874e06 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -49,8 +49,8 @@ importers: specifier: ^3.0.2 version: 3.0.2 release-plan: - specifier: ^0.5.1 - version: 0.5.1 + specifier: ^0.8.0 + version: 0.8.0 typescript: specifier: ^4.7.4 version: 4.7.4 @@ -418,11 +418,12 @@ packages: minimist: 1.2.8 dev: true - /@ef4/lerna-changelog@2.0.0: - resolution: {integrity: sha512-dCT3wMC501ZQqFwroxuDrktSm8tgrmMO67S7hRbJqRbbUarkYd0KVZPyW+O569lVBdEVTGTWWMNmPgGrD9IQjA==} + /@ef4/lerna-changelog@2.2.1: + resolution: {integrity: sha512-x0SkFpfvNj6l4LV6UnvnWIohmt8bC+i/P3ybmPc8X92KVMP6X/rkPeOxa2hI8BfDEHJMNXLJrDgQrJawI57aGQ==} engines: {node: 12.* || 14.* || >= 16} hasBin: true dependencies: + '@manypkg/get-packages': 2.2.0 chalk: 4.1.2 cli-highlight: 2.1.11 execa: 5.1.1 @@ -573,6 +574,33 @@ packages: '@jridgewell/sourcemap-codec': 1.4.15 dev: true + /@manypkg/find-root@2.2.1: + resolution: {integrity: sha512-34NlypD5mmTY65cFAK7QPgY5Tzt0qXR4ZRXdg97xAlkiLuwXUPBEXy5Hsqzd+7S2acsLxUz6Cs50rlDZQr4xUA==} + engines: {node: '>=14.18.0'} + dependencies: + '@manypkg/tools': 1.1.0 + find-up: 4.1.0 + fs-extra: 8.1.0 + dev: true + + /@manypkg/get-packages@2.2.0: + resolution: {integrity: sha512-B5p5BXMwhGZKi/syEEAP1eVg5DZ/9LP+MZr0HqfrHLgu9fq0w4ZwH8yVen4JmjrxI2dWS31dcoswYzuphLaRxg==} + engines: {node: '>=14.18.0'} + dependencies: + '@manypkg/find-root': 2.2.1 + '@manypkg/tools': 1.1.0 + dev: true + + /@manypkg/tools@1.1.0: + resolution: {integrity: sha512-SkAyKAByB9l93Slyg8AUHGuM2kjvWioUTCckT/03J09jYnfEzMO/wSXmEhnKGYs6qx9De8TH4yJCl0Y9lRgnyQ==} + engines: {node: '>=14.18.0'} + dependencies: + fs-extra: 8.1.0 + globby: 11.1.0 + jju: 1.4.0 + read-yaml-file: 1.1.0 + dev: true + /@nodelib/fs.scandir@2.1.5: resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -4041,6 +4069,14 @@ packages: resolution: {integrity: sha512-XYKutXMrIK99YMUPf91KX5QVJoG31/OsgftD6YoTPAObfQIxM4ziA9f0J1AsqKhJmo+IeaIPP0CFopTD4bdUBw==} dev: true + /find-up@4.1.0: + resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} + engines: {node: '>=8'} + dependencies: + locate-path: 5.0.0 + path-exists: 4.0.0 + dev: true + /find-up@5.0.0: resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} engines: {node: '>=10'} @@ -5317,6 +5353,10 @@ packages: '@pkgjs/parseargs': 0.11.0 dev: true + /jju@1.4.0: + resolution: {integrity: sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==} + dev: true + /js-string-escape@1.0.1: resolution: {integrity: sha512-Smw4xcfIQ5LVjAOuJCvN/zIodzA/BBSsluuoSykP+lUvScIi4U6RJLfwHet5cxFnCswUjISV8oAXaqaJDY3chg==} engines: {node: '>= 0.8'} @@ -5497,6 +5537,13 @@ packages: engines: {node: '>=14'} dev: true + /locate-path@5.0.0: + resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} + engines: {node: '>=8'} + dependencies: + p-locate: 4.1.0 + dev: true + /locate-path@6.0.0: resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} engines: {node: '>=10'} @@ -6425,6 +6472,13 @@ packages: engines: {node: '>=6'} dev: true + /p-limit@2.3.0: + resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} + engines: {node: '>=6'} + dependencies: + p-try: 2.2.0 + dev: true + /p-limit@3.1.0: resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} engines: {node: '>=10'} @@ -6432,6 +6486,13 @@ packages: yocto-queue: 0.1.0 dev: true + /p-locate@4.1.0: + resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} + engines: {node: '>=8'} + dependencies: + p-limit: 2.3.0 + dev: true + /p-locate@5.0.0: resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} engines: {node: '>=10'} @@ -6453,6 +6514,11 @@ packages: aggregate-error: 3.1.0 dev: true + /p-try@2.2.0: + resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} + engines: {node: '>=6'} + dev: true + /package-json@6.5.0: resolution: {integrity: sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==} engines: {node: '>=8'} @@ -6588,6 +6654,11 @@ packages: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} + /pify@4.0.1: + resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==} + engines: {node: '>=6'} + dev: true + /portfinder@1.0.32: resolution: {integrity: sha512-on2ZJVVDXRADWE6jnQaX0ioEylzgBpQk8r55NE4wjXW1ZxO+BgDlY6DXwj20i0V8eB4SenDQ00WEaxfiIQPcxg==} engines: {node: '>= 0.12.0'} @@ -6775,6 +6846,16 @@ packages: strip-json-comments: 2.0.1 dev: true + /read-yaml-file@1.1.0: + resolution: {integrity: sha512-VIMnQi/Z4HT2Fxuwg5KrY174U1VdUIASQVWXXyqtNRtxSr9IYkn1rsI6Tb6HsrHCmB7gVpNwX6JxPTHcH6IoTA==} + engines: {node: '>=6'} + dependencies: + graceful-fs: 4.2.11 + js-yaml: 3.14.1 + pify: 4.0.1 + strip-bom: 3.0.0 + dev: true + /readable-stream@1.0.34: resolution: {integrity: sha512-ok1qVCJuRkNmvebYikljxJA/UEsKwLl2nI1OmaqAu4/UE+h0wKCHok4XkL/gvi39OacXvw59RJUOFUkDib2rHg==} dependencies: @@ -6839,11 +6920,12 @@ packages: rc: 1.2.8 dev: true - /release-plan@0.5.1: - resolution: {integrity: sha512-3GebglBmiCXjkUYETOvWhKttpyufDn+khkW/DAuCRA3dUwbRA/f7Yd5r37kluOgeJ+FSSWM0lYyoYCqV+UKB8Q==} + /release-plan@0.8.0: + resolution: {integrity: sha512-kOR8rjuSD4ljH/BOoWeX5ECjQ0Wf0jl0xLFeKQpOCx2Qoo2Y+A+is4t2GRMtFUGjoA5Wp+j7aJaIFFbZNEC+oA==} hasBin: true dependencies: - '@ef4/lerna-changelog': 2.0.0 + '@ef4/lerna-changelog': 2.2.1 + '@manypkg/get-packages': 2.2.0 '@npmcli/package-json': 5.0.0 '@octokit/rest': 19.0.13 '@types/fs-extra': 9.0.13