diff --git a/.github/workflows/plan-release.yml b/.github/workflows/plan-release.yml index e72b59d..2f51915 100644 --- a/.github/workflows/plan-release.yml +++ b/.github/workflows/plan-release.yml @@ -46,28 +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 - - uses: wyvox/action-setup-pnpm@v3 - + ref: 'main' + - uses: actions/setup-node@v4 + with: + node-version: 18 + + - 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 + 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@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 f082fa2..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 @@ -37,20 +37,26 @@ jobs: name: "NPM Publish" runs-on: ubuntu-latest needs: check-plan + if: needs.check-plan.outputs.command == 'release' permissions: contents: write pull-requests: write - if: needs.check-plan.outputs.command == 'release' steps: - uses: actions/checkout@v4 - - uses: wyvox/action-setup-pnpm@v3 + - uses: actions/setup-node@v4 with: + node-version: 18 # This creates an .npmrc that reads the NODE_AUTH_TOKEN environment variable - node-registry-url: 'https://registry.npmjs.org' + registry-url: 'https://registry.npmjs.org' + + - uses: pnpm/action-setup@v3 + with: + version: 8 + - run: pnpm install --frozen-lockfile - name: npm publish run: pnpm release-plan publish - + env: GITHUB_AUTH: ${{ secrets.GITHUB_TOKEN }} NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/RELEASE.md b/RELEASE.md index afb396d..391a175 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 0bbecfc..8348359 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "concurrently": "^8.2.2", "prettier": "^3.0.3", "prettier-plugin-ember-template-tag": "^2.0.0", - "release-plan": "^0.7.0" + "release-plan": "^0.8.0" }, "volta": { "node": "20.11.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0c3910a..5da7f67 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -24,8 +24,8 @@ importers: specifier: ^2.0.0 version: 2.0.0(prettier@3.0.3) release-plan: - specifier: ^0.7.0 - version: 0.7.0 + specifier: ^0.8.0 + version: 0.8.0 docs: devDependencies: @@ -1867,8 +1867,8 @@ packages: postcss-selector-parser: 6.0.13 dev: true - /@ef4/lerna-changelog@2.1.0: - resolution: {integrity: sha512-c6301SsWdOBrTGEkQmDTK5dDJUX2+03kN6UYZhewkqih3vy3HZxp1G1eJPVPd5EQpaLRptxFsMtgDcsabPZmRg==} + /@ef4/lerna-changelog@2.2.1: + resolution: {integrity: sha512-x0SkFpfvNj6l4LV6UnvnWIohmt8bC+i/P3ybmPc8X92KVMP6X/rkPeOxa2hI8BfDEHJMNXLJrDgQrJawI57aGQ==} engines: {node: 12.* || 14.* || >= 16} hasBin: true dependencies: @@ -13756,11 +13756,11 @@ packages: dependencies: jsesc: 0.5.0 - /release-plan@0.7.0: - resolution: {integrity: sha512-DHQ8o1Vnv27fIKecM4EA8r10NqVCa441Qld9STCZ90DOgxCTMUDpOxB3TASxeNd6gtHTvOwen6CPZWYM3uE+AA==} + /release-plan@0.8.0: + resolution: {integrity: sha512-kOR8rjuSD4ljH/BOoWeX5ECjQ0Wf0jl0xLFeKQpOCx2Qoo2Y+A+is4t2GRMtFUGjoA5Wp+j7aJaIFFbZNEC+oA==} hasBin: true dependencies: - '@ef4/lerna-changelog': 2.1.0 + '@ef4/lerna-changelog': 2.2.1 '@manypkg/get-packages': 2.2.0 '@npmcli/package-json': 5.0.0 '@octokit/rest': 19.0.13