Skip to content

Commit

Permalink
Add own action for prereleases (#511)
Browse files Browse the repository at this point in the history
Thought is to tag the prerelease with a beta tag on the registry
  • Loading branch information
ovineq authored Oct 26, 2022
1 parent 832e202 commit 65f145e
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
19 changes: 19 additions & 0 deletions .github/workflows/npmpublish-beta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Publish Beta Package

on:
release:
types: [prereleased]

jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
registry-url: 'https://registry.npmjs.org/'
- run: npm ci
- run: npm run pub-beta
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
2 changes: 1 addition & 1 deletion .github/workflows/npmpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Publish Package

on:
release:
types: [created]
types: [released]

jobs:
publish-npm:
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"build": "rollup -c",
"prepub": "npm run build",
"pub": "npm publish --access=public",
"pub-beta": "npm publish --tag=beta --access=public",
"lint": "eslint --ext .js,.jsx,.ts,.tsx src test",
"test": "tsc --project tsconfig.test.json && jest",
"test:watch": "jest --watchAll",
Expand Down

0 comments on commit 65f145e

Please sign in to comment.