Skip to content

Commit c760360

Browse files
committed
Add --singlePackage, use action-setup-pnpm, and set explicit permissions. See: release-plan/release-plan#19
1 parent 03a7778 commit c760360

2 files changed

Lines changed: 10 additions & 17 deletions

File tree

.github/workflows/plan-release.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ jobs:
3434
runs-on: ubuntu-latest
3535
timeout-minutes: 5
3636
needs: check-plan
37+
permissions:
38+
contents: write
39+
pull-requests: write
3740
outputs:
3841
explanation: ${{ steps.explanation.outputs.text }}
3942
# only run on push event if plan wasn't updated (don't create a release plan when we're releasing)
@@ -46,21 +49,14 @@ jobs:
4649
# lerna-changelog can discover what's changed since the last release
4750
with:
4851
fetch-depth: 0
49-
- uses: actions/setup-node@v4
50-
with:
51-
node-version: 18
52-
53-
- uses: pnpm/action-setup@v2
54-
with:
55-
version: 8
56-
- run: pnpm install --frozen-lockfile
52+
- uses: wyvox/action-setup-pnpm@v3
5753

5854
- name: "Generate Explanation and Prep Changelogs"
5955
id: explanation
6056
run: |
6157
set -x
6258
63-
pnpm release-plan prepare
59+
pnpm release-plan prepare --singlePackage=@starbeam-dev/compile
6460
6561
echo 'text<<EOF' >> $GITHUB_OUTPUT
6662
jq .description .release-plan.json -r >> $GITHUB_OUTPUT

.github/workflows/publish.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,16 @@ jobs:
3838
runs-on: ubuntu-latest
3939
needs: check-plan
4040
if: needs.check-plan.outputs.command == 'release'
41+
permissions:
42+
contents: write
43+
pull-requests: write
4144

4245
steps:
4346
- uses: actions/checkout@v4
44-
- uses: actions/setup-node@v4
47+
- uses: wyvox/action-setup-pnpm@v3
4548
with:
46-
node-version: 18
4749
# This creates an .npmrc that reads the NODE_AUTH_TOKEN environment variable
48-
registry-url: 'https://registry.npmjs.org'
49-
50-
- uses: pnpm/action-setup@v2
51-
with:
52-
version: 8
53-
- run: pnpm install --frozen-lockfile
50+
node-registry-url: 'https://registry.npmjs.org'
5451
- name: npm publish
5552
run: pnpm release-plan publish
5653

0 commit comments

Comments
 (0)