Skip to content

Commit

Permalink
Add --singlePackage, use action-setup-pnpm, and set explicit permissi…
Browse files Browse the repository at this point in the history
  • Loading branch information
NullVoxPopuli committed Jan 4, 2024
1 parent 03a7778 commit c760360
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 17 deletions.
14 changes: 5 additions & 9 deletions .github/workflows/plan-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -46,21 +49,14 @@ jobs:
# lerna-changelog can discover what's changed since the last release
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 18

- uses: pnpm/action-setup@v2
with:
version: 8
- run: pnpm install --frozen-lockfile
- uses: wyvox/action-setup-pnpm@v3

- name: "Generate Explanation and Prep Changelogs"
id: explanation
run: |
set -x
pnpm release-plan prepare
pnpm release-plan prepare --singlePackage=@starbeam-dev/compile
echo 'text<<EOF' >> $GITHUB_OUTPUT
jq .description .release-plan.json -r >> $GITHUB_OUTPUT
Expand Down
13 changes: 5 additions & 8 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,16 @@ 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
- uses: actions/setup-node@v4
- uses: wyvox/action-setup-pnpm@v3
with:
node-version: 18
# This creates an .npmrc that reads the NODE_AUTH_TOKEN environment variable
registry-url: 'https://registry.npmjs.org'

- uses: pnpm/action-setup@v2
with:
version: 8
- run: pnpm install --frozen-lockfile
node-registry-url: 'https://registry.npmjs.org'
- name: npm publish
run: pnpm release-plan publish

Expand Down

0 comments on commit c760360

Please sign in to comment.