Skip to content

Commit

Permalink
ci: added a github workflow to publish pr snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
alecdwm committed Jan 16, 2023
1 parent 3fc508a commit f6c9f39
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/publish-pr-snapshot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Publish PR Snapshot

on:
pull_request:
branches: [dev]

jobs:
publish:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: lts/*
registry-url: https://registry.npmjs.org

- run: yarn --immutable
- run: yarn plugin import workspace-tools
- run: yarn changeset version --snapshot pr${{ github.event.pull_request.number }}.$(git rev-parse --short HEAD)
- run: yarn build:packages:prod
- run: yarn workspaces foreach --verbose --no-private npm publish --tolerate-republish --tag pr${{ github.event.pull_request.number }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit f6c9f39

Please sign in to comment.