Skip to content

Commit 12c0279

Browse files
committed
add publish step to GH action
1 parent 2fea0ce commit 12c0279

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/publish.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Publish Package to npmjs
2+
on:
3+
# keeping it purely manual for now as to not accidentally trigger a release
4+
#release:
5+
# types: [published]
6+
workflow_dispatch:
7+
inputs:
8+
package:
9+
description: 'Package'
10+
required: true
11+
type: choice
12+
options:
13+
- '@reduxjs/toolkit'
14+
- '@rtk-query/codegen-openapi'
15+
- '@rtk-query/graphql-request-base-query'
16+
- '@reduxjs/rtk-codemods'
17+
jobs:
18+
publish:
19+
runs-on: ubuntu-latest
20+
permissions:
21+
id-token: write
22+
contents: read
23+
steps:
24+
- uses: actions/checkout@v3
25+
- uses: actions/setup-node@v3
26+
with:
27+
node-version: '18.x'
28+
registry-url: 'https://registry.npmjs.org'
29+
cache: 'yarn'
30+
- run: yarn install --frozen-lockfile
31+
- run: yarn workspace ${{ inputs.package }} test
32+
- run: yarn workspace ${{ inputs.package }} exec npm publish --access public --provenance
33+
env:
34+
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}

0 commit comments

Comments
 (0)