Skip to content

Commit

Permalink
publish: gh pkg
Browse files Browse the repository at this point in the history
  • Loading branch information
JairusSW committed Sep 29, 2023
1 parent 2a580a7 commit 010f7ec
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 1 deletion.
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: json-as

on:
release:
types: [created]

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

publish-gpr:
needs: build
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 16
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 @@
@JairusSW:registry=https://npm.pkg.github.com
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,8 @@
"url": "https://github.com/JairusSW/as-json/issues"
},
"homepage": "https://github.com/JairusSW/as-json#readme",
"type": "module"
"type": "module",
"publishConfig": {
"@JairusSW:registry": "https://npm.pkg.github.com"
}
}

0 comments on commit 010f7ec

Please sign in to comment.