Skip to content
name: Build and Publish NPM Package
on:
push:
branches:
- develop
jobs:
deploy-beta:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/develop'
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org/
- name: Install dependencies
run: npm install
- name: Build
run: npm ci && npm run build:prod
- name: Publish to npm (beta version)
run: npm run npm:publish:beta
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}
deploy-release:
runs-on: ubuntu-latest
needs: build

Check failure on line 34 in .github/workflows/npm-publish-beta.yml

View workflow run for this annotation

GitHub Actions / Build and Publish NPM Package

Invalid workflow file

The workflow is not valid. .github/workflows/npm-publish-beta.yml (Line: 34, Col: 16): Job 'deploy-release' depends on unknown job 'build'.
if: github.ref == 'refs/heads/master'
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org/
- name: Install dependencies
run: npm install
- name: Build
run: npm ci && npm run build:prod
- name: Publish to npm (release version)
run: npm run npm:publish:latest
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}