Skip to content

Commit

Permalink
Add package workflow
Browse files Browse the repository at this point in the history
Include the necessary config opts in npmrc, package.json
  • Loading branch information
roosta committed Nov 1, 2022
1 parent 87fba8f commit 0d5c751
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/release-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Node.js Package

on:
release:
types: [created]

jobs:
publish-gpr:
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.PACKAGE_TOKEN}}
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@srcery-colors: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 @@ -3,6 +3,9 @@
"version": "1.0.0",
"main": "./srcery.js",
"description": "Srcery palette exposed as a package, used in other projects",
"publishConfig": {
"@srcery-colors:registry": "https://npm.pkg.github.com"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
Expand Down

0 comments on commit 0d5c751

Please sign in to comment.