Skip to content

Commit

Permalink
chore: publish npm to github
Browse files Browse the repository at this point in the history
  • Loading branch information
hperl committed Dec 12, 2023
1 parent caa7c9e commit 39d937b
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Publish
on:
push:
branches:
- main
- master
- hperl/gh-npm-publish
tags:
- v*

jobs:
publish:
runs-on: ubuntu-latest
permissions:
packages: write
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "18"
- run: npm ci --legacy-peer-deps
- run: npm run build
- run: |
echo @ory:https://npm.pkg.github.com/ > .npmrc
echo '//npm.pkg.github.com/:_authToken=${NPM_TOKEN}' >> .npmrc
- run: npm publish
env:
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
"type": "git",
"url": "git+https://github.com/ory/kratos-selfservice-ui-node.git"
},
"publishConfig": {
"registry": "https://npm.pkg.github.com"
},
"license": "Apache-2.0",
"author": "Aeneas Rekkas",
"main": "src/index.ts",
Expand Down

0 comments on commit 39d937b

Please sign in to comment.