Skip to content

Commit

Permalink
Integrating github packages flow
Browse files Browse the repository at this point in the history
  • Loading branch information
Hetarth02 committed Jul 31, 2022
1 parent 3936de2 commit 32a6e1b
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/release-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: js-array-helpers

on:
release:
types: [created]

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

publish-gpr:
needs: build
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 12
registry-url: https://npm.pkg.github.com/
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@Hetarth02:registry=https://npm.pkg.github.com
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
"package",
"helpers"
],
"publishConfig": {
"@Hetarth02:registry": "https://npm.pkg.github.com"
},
"author": {
"name": "Hetarth Shah",
"url": "https://hetarth.tech/"
Expand Down

0 comments on commit 32a6e1b

Please sign in to comment.