Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
raphckrman authored Mar 24, 2024
1 parent 89833fe commit c078cc2
Showing 1 changed file with 22 additions and 13 deletions.
35 changes: 22 additions & 13 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,34 @@
name: Publish new release on NPM
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages

name: Publish new realese on NPM

on:
release:
types: [created]

jobs:
publish:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '14'
node-version: 16
- run: npm i
- run: npm run build

- name: Build and Publish
run: |
npm install
npm run build
npm publish --access public
publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org/
- run: npm i
- run: npm run build
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_TOKEN }}

0 comments on commit c078cc2

Please sign in to comment.