Skip to content

Commit

Permalink
workflow to publish package
Browse files Browse the repository at this point in the history
  • Loading branch information
spaceo committed Aug 29, 2024
1 parent b4be344 commit a1d4c0e
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/release-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Node.js Package

on:
release:
types: [created]
push:
branches:
- main

jobs:
publish-gpr:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
registry-url: https://npm.pkg.github.com/
- run: npm install
- run: npm run build
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v20
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
"bin": {
"json-to-zod": "./src/cli.js"
},
"publishConfig": {
"@spaceo:registry": "https://npm.pkg.github.com"
},
"dependencies": {
"cosmiconfig": "^9.0.0",
"prettier": "^2.3.2"
Expand Down

0 comments on commit a1d4c0e

Please sign in to comment.