Skip to content

Commit a90dd8e

Browse files
committed
Publish to github packages.
1 parent a1554ab commit a90dd8e

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

.github/workflows/npm-publish.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,24 @@ jobs:
3030
run: npm publish --access public
3131
env:
3232
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
33+
34+
- name: Set up Node.js for GitHub Packages
35+
uses: actions/setup-node@v4
36+
with:
37+
node-version: 22.x
38+
registry-url: 'https://npm.pkg.github.com/'
39+
scope: '@brahma-dev'
40+
41+
- name: Modify package.json for GitHub Packages
42+
run: |
43+
node -e '
44+
const fs = require("fs");
45+
const pkg = JSON.parse(fs.readFileSync("package.json", "utf8"));
46+
pkg.name = "@brahma-dev/" + pkg.name;
47+
fs.writeFileSync("package.json", JSON.stringify(pkg, null, 2));
48+
'
49+
50+
- name: Publish to GitHub Packages
51+
run: npm publish
52+
env:
53+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)