Skip to content

Commit

Permalink
add prerelease handling to publish
Browse files Browse the repository at this point in the history
  • Loading branch information
tatethurston committed Sep 20, 2024
1 parent 2ae2190 commit 71afd45
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Publish NPM Package
on:
release:
types: [created]
types: [published]
workflow_dispatch:
jobs:
build:
Expand All @@ -16,6 +16,12 @@ jobs:
registry-url: "https://registry.npmjs.org"
- run: pnpm install --frozen-lockfile
- run: pnpm package:build
- run: (cd packages/nextjs-routes/ && npm publish)
- run: |
cd packages/nextjs-routes
if [ "${{ github.event.release.prerelease }}" = "true" ]; then
npm publish --tag next
else
npm publish
fi
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 71afd45

Please sign in to comment.