Skip to content

Publish Package to npmjs #20

Publish Package to npmjs

Publish Package to npmjs #20

Workflow file for this run

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'
tag:
description: 'NPM dist-tag (latest, alpha, beta, next)'
required: true
default: 'latest'
type: choice
options:
- latest
- next
- alpha
- beta
permissions: {}
jobs:
publish:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
with:
persist-credentials: false
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
with:
node-version: '24.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 --tag ${{ inputs.tag }}