Publish version #24
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Package to npmjs | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
branch: | ||
description: 'Branch to use' | ||
required: true | ||
default: 'master' | ||
type: choice | ||
options: | ||
- master | ||
- feat/zustand | ||
version: | ||
description: 'Version' | ||
required: true | ||
default: 'beta' | ||
type: choice | ||
options: | ||
- beta | ||
- release | ||
permissions: | ||
contents: write | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.event.inputs.branch }} | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18.x' | ||
registry-url: 'https://registry.npmjs.org' | ||
- name: Install pnpm | ||
run: npm i pnpm -g | ||
- name: Install dependencies | ||
run: pnpm install | ||
- name: Run lint and prettier | ||
run: pnpm format | ||
- name: Build | ||
run: pnpm build | ||
- name: Publish Beta | ||
run: npm publish --tag beta --access public | ||
if: ${{ github.event.inputs.version == "beta" }} | ||
Check failure on line 46 in .github/workflows/publish.yaml GitHub Actions / Publish Package to npmjsInvalid workflow file
|
||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
- name: Publish | ||
run: npm publish --access public | ||
if: ${{ github.event.inputs.version == "release" }} | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |