diff --git a/.github/workflows/plan-release.yml b/.github/workflows/plan-release.yml index cca036a..39eb1e3 100644 --- a/.github/workflows/plan-release.yml +++ b/.github/workflows/plan-release.yml @@ -2,14 +2,13 @@ name: Release Plan Review on: push: branches: - - main - - master + - 3.x pull_request: types: - labeled concurrency: - group: plan-release # only the latest one of these should ever be running + group: plan-3.x-release # only the latest one of these should ever be running cancel-in-progress: true jobs: @@ -23,14 +22,14 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 - ref: 'main' + ref: "3.x" # 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 run: if git diff --name-only HEAD HEAD~1 | grep -w -q ".release-plan.json"; then echo "command=release"; fi >> $GITHUB_OUTPUT prepare_release_notes: - name: Prepare Release Notes + name: Prepare Release Notes 3.x runs-on: ubuntu-latest timeout-minutes: 5 needs: check-plan @@ -49,21 +48,21 @@ jobs: # github-changelog can discover what's changed since the last release with: fetch-depth: 0 - ref: 'main' + ref: "3.x" - uses: actions/setup-node@v4 with: node-version: 18 - + - uses: pnpm/action-setup@v3 - run: pnpm install --frozen-lockfile - + - name: "Generate Explanation and Prep Changelogs" id: explanation run: | set +e - + pnpm release-plan prepare 2> >(tee -a stderr.log >&2) - + if [ $? -ne 0 ]; then echo 'text<> $GITHUB_OUTPUT @@ -82,7 +81,7 @@ jobs: commit-message: "Prepare Release using 'release-plan'" labels: "internal" branch: release-preview - title: Prepare Release + title: Prepare Release (3.x) 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 a35f506..5a99d8c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -8,11 +8,10 @@ on: workflow_dispatch: push: branches: - - main - - master + - 3.x concurrency: - group: publish-${{ github.head_ref || github.ref }} + group: publish-3.x-${{ github.head_ref || github.ref }} cancel-in-progress: true jobs: @@ -26,7 +25,7 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 - ref: 'main' + ref: "3.x" # 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 @@ -48,13 +47,13 @@ jobs: with: node-version: 18 # This creates an .npmrc that reads the NODE_AUTH_TOKEN environment variable - registry-url: 'https://registry.npmjs.org' - + registry-url: "https://registry.npmjs.org" + - uses: pnpm/action-setup@v3 - run: pnpm install --frozen-lockfile - name: npm publish - run: pnpm release-plan publish - + run: pnpm release-plan publish --publish-branch=3.x + env: GITHUB_AUTH: ${{ secrets.GITHUB_TOKEN }} NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/package.json b/package.json index a580a4b..cd32f5f 100644 --- a/package.json +++ b/package.json @@ -77,5 +77,8 @@ "volta": { "node": "18.20.2", "pnpm": "9.0.6" + }, + "release-plan": { + "publishTag": "3-x" } }