Skip to content

Publish version

Publish version #24

Workflow file for this run

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

View workflow run for this annotation

GitHub Actions / Publish Package to npmjs

Invalid workflow file

The workflow is not valid. .github/workflows/publish.yaml (Line: 46, Col: 13): Unexpected symbol: '"beta"'. Located at position 32 within expression: github.event.inputs.version == "beta" .github/workflows/publish.yaml (Line: 51, Col: 13): Unexpected symbol: '"release"'. Located at position 32 within expression: github.event.inputs.version == "release"
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 }}