chore: minor fix in workflow yml #3
Workflow file for this run
This file contains hidden or 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 nopalm to npm registry | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
versioning: | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout the code | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
# Set up Node.js environment | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20' | |
# Install dependencies | |
- name: Install dependencies | |
run: yarn install --frozen-lockfile --production | |
# Run linting | |
- name: Run lint | |
run: yarn lint | |
# Run tests | |
- name: Run tests | |
run: yarn test | |
# Build production version of react client | |
- name: Build client | |
run: yarn build-client | |
# Semantic release step: Automatically determine the version and release | |
- name: Semantic Release for versioning | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: | | |
yarn release | |
# Optionally, you can include a job to deploy to npm | |
publish: | |
needs: versioning | |
runs-on: ubuntu-latest | |
steps: | |
# Publish to npm | |
- name: Publish to npm | |
run: yarn publish --non-interactive | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |