Skip to content

Commit

Permalink
Updates the version of node used for Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
racampos committed Dec 22, 2023
1 parent 9225460 commit 42ce050
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,29 @@ name: Publish npm package
on:
push:
branches:
- main # This specifies that the action should only trigger on pushes to the main branch
- main

jobs:
build-and-publish:
runs-on: ubuntu-latest # Specifies the type of machine to run the job on
runs-on: ubuntu-latest

steps:
- name: Check out the repository
uses: actions/checkout@v2 # Checks out your repository under $GITHUB_WORKSPACE, so your job can access it
uses: actions/checkout@v3 # Updated to v3

- name: Use Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v3 # Updated to v3
with:
node-version: "14" # Specify the version of Node.js you want to use
node-version: "16" # Specify Node.js 16, or another version if your project requires it
registry-url: "https://registry.npmjs.org/"

- name: Install dependencies
run: npm ci # Installs node modules and ensures a clean install
run: npm ci

- name: Run tests
run: npm test # Replace with your test script
run: npm test

- name: Publish to npm
run: npm publish # Publishes your package to npm
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} # Uses the npm token from your repository's secrets
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 42ce050

Please sign in to comment.