Skip to content

Commit

Permalink
automated npm publish throught github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
TejasLamba2006 committed Aug 26, 2023
1 parent 45d8daf commit 8f428f0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 26 deletions.
36 changes: 11 additions & 25 deletions .github/workflows/npm-publish-github-packages.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,20 @@
# 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: Node.js Package

name: "publish npm"
on:
release:
types: [created]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- run: npm test

publish-gpr:
needs: build
publish:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- name: checkout
uses: actions/checkout@v2
- name: node
uses: actions/setup-node@v2
with:
node-version: 16
registry-url: https://npm.pkg.github.com/
- run: npm publish
node-version: 12
registry-url: https://registry.npmjs.org
- name: publish
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.TOKEN_NPM}}
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pikanetwork.js",
"version": "1.1.1",
"version": "1.1.2",
"description": "An easy to use PikaNetwork API wrapper.",
"main": "src/index.js",
"author": "TejasLamba2006",
Expand Down

0 comments on commit 8f428f0

Please sign in to comment.