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