diff --git a/.github/workflows/plan-release.yml b/.github/workflows/plan-release.yml index a684fd4..2f51915 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: @@ -23,7 +23,7 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 - ref: 'master' + 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 @@ -46,35 +46,42 @@ 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 - + - name: "Generate Explanation and Prep Changelogs" id: explanation run: | - set -x - - pnpm release-plan prepare --singlePackage=@ef4/lerna-changelog + set +e + + 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 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index f68e29d..2b7acc1 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 @@ -26,7 +26,7 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 - ref: 'master' + ref: 'main' # This will only cause the `check-plan` job to have a result of `success` # when the .release-plan.json file was changed on the last commit. This # plus the fact that this action only runs on main will be enough of a guard @@ -50,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 diff --git a/RELEASE.md b/RELEASE.md index 968ace7..00a7858 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -1,10 +1,10 @@ # 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 -Since the majority of the actual release process is automated, the remaining tasks before releasing are: +Since the majority of the actual release process is automated, the remaining tasks before releasing are: - correctly labeling **all** pull requests that have been merged since the last release - updating pull request titles so they make sense to our users diff --git a/package.json b/package.json index 9863cb6..05094a4 100644 --- a/package.json +++ b/package.json @@ -84,7 +84,7 @@ "jest": "28.1.3", "jest-runner-eslint": "2.1.2", "prettier": "2.8.8", - "release-plan": "^0.6.0", + "release-plan": "^0.8.0", "rimraf": "3.0.2", "ts-jest": "29.1.1", "typescript": "5.0.4" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 462397c..dd6eec4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -68,8 +68,8 @@ devDependencies: specifier: 2.8.8 version: 2.8.8 release-plan: - specifier: ^0.6.0 - version: 0.6.0 + specifier: ^0.8.0 + version: 0.8.0 rimraf: specifier: 3.0.2 version: 3.0.2 @@ -414,11 +414,12 @@ packages: resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} 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 @@ -797,7 +798,6 @@ packages: '@manypkg/tools': 1.1.0 find-up: 4.1.0 fs-extra: 8.1.0 - dev: false /@manypkg/get-packages@2.2.0: resolution: {integrity: sha512-B5p5BXMwhGZKi/syEEAP1eVg5DZ/9LP+MZr0HqfrHLgu9fq0w4ZwH8yVen4JmjrxI2dWS31dcoswYzuphLaRxg==} @@ -805,7 +805,6 @@ packages: dependencies: '@manypkg/find-root': 2.2.1 '@manypkg/tools': 1.1.0 - dev: false /@manypkg/tools@1.1.0: resolution: {integrity: sha512-SkAyKAByB9l93Slyg8AUHGuM2kjvWioUTCckT/03J09jYnfEzMO/wSXmEhnKGYs6qx9De8TH4yJCl0Y9lRgnyQ==} @@ -815,7 +814,6 @@ packages: globby: 11.1.0 jju: 1.4.0 read-yaml-file: 1.1.0 - dev: false /@nodelib/fs.scandir@2.1.5: resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} @@ -2188,7 +2186,6 @@ packages: graceful-fs: 4.2.11 jsonfile: 4.0.0 universalify: 0.1.2 - dev: false /fs-minipass@2.1.0: resolution: {integrity: sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==} @@ -3051,7 +3048,6 @@ packages: /jju@1.4.0: resolution: {integrity: sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==} - dev: false /js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} @@ -3112,7 +3108,6 @@ packages: resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} optionalDependencies: graceful-fs: 4.2.11 - dev: false /jsonfile@6.1.0: resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} @@ -3605,7 +3600,6 @@ packages: /pify@4.0.1: resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==} engines: {node: '>=6'} - dev: false /pirates@4.0.6: resolution: {integrity: sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==} @@ -3730,7 +3724,6 @@ packages: js-yaml: 3.14.1 pify: 4.0.1 strip-bom: 3.0.0 - dev: false /registry-auth-token@4.2.2: resolution: {integrity: sha512-PC5ZysNb42zpFME6D/XlIgtNGdTl8bBOCw90xQLVMpzuuubJKYDWFAEuUNc+Cn8Z8724tg2SDhDRrkVEsqfDMg==} @@ -3746,11 +3739,12 @@ packages: rc: 1.2.8 dev: true - /release-plan@0.6.0: - resolution: {integrity: sha512-5c4JdHXPtVDEbC/aNCaTAr+NrVm1NST3rCFSVkdGInXfJ8KLPFWBZ9/AtIniTRb+E6vjJwy33N9DTnuW76iRpQ==} + /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 @@ -3988,7 +3982,6 @@ packages: /strip-bom@3.0.0: resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} engines: {node: '>=4'} - dev: false /strip-bom@4.0.0: resolution: {integrity: sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==} @@ -4210,7 +4203,6 @@ packages: /universalify@0.1.2: resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} engines: {node: '>= 4.0.0'} - dev: false /universalify@2.0.1: resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==}