pruny 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
name: Publish to npm
|
|
1
|
+
name: Publish to npm and GitHub Packages
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
4
|
push:
|
|
@@ -13,6 +13,7 @@ jobs:
|
|
|
13
13
|
permissions:
|
|
14
14
|
contents: write
|
|
15
15
|
id-token: write
|
|
16
|
+
packages: write
|
|
16
17
|
steps:
|
|
17
18
|
- uses: actions/checkout@v4
|
|
18
19
|
with:
|
|
@@ -23,7 +24,7 @@ jobs:
|
|
|
23
24
|
with:
|
|
24
25
|
bun-version: latest
|
|
25
26
|
|
|
26
|
-
- name: Setup Node.js
|
|
27
|
+
- name: Setup Node.js (npm)
|
|
27
28
|
uses: actions/setup-node@v4
|
|
28
29
|
with:
|
|
29
30
|
node-version: "20"
|
|
@@ -56,7 +57,6 @@ jobs:
|
|
|
56
57
|
if: github.event_name == 'push'
|
|
57
58
|
uses: softprops/action-gh-release@v1
|
|
58
59
|
with:
|
|
59
|
-
# Use the version from the bump step
|
|
60
60
|
tag_name: v${{ steps.bump.outputs.VERSION }}
|
|
61
61
|
name: v${{ steps.bump.outputs.VERSION }}
|
|
62
62
|
generate_release_notes: true
|
|
@@ -69,3 +69,26 @@ jobs:
|
|
|
69
69
|
run: npm publish --access public
|
|
70
70
|
env:
|
|
71
71
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
72
|
+
|
|
73
|
+
# --- GitHub Packages Publishing ---
|
|
74
|
+
|
|
75
|
+
- name: Setup Node.js (GitHub Packages)
|
|
76
|
+
uses: actions/setup-node@v4
|
|
77
|
+
with:
|
|
78
|
+
node-version: "20"
|
|
79
|
+
registry-url: "https://npm.pkg.github.com"
|
|
80
|
+
scope: "@webnaresh"
|
|
81
|
+
|
|
82
|
+
- name: Publish to GitHub Packages
|
|
83
|
+
run: |
|
|
84
|
+
# Rename package to scoped name for GitHub Packages
|
|
85
|
+
# We use jq to temporarily modify package.json just for this step
|
|
86
|
+
jq '.name = "@webnaresh/pruny"' package.json > package.json.tmp && mv package.json.tmp package.json
|
|
87
|
+
|
|
88
|
+
# Publish using GITHUB_TOKEN
|
|
89
|
+
npm publish --access public
|
|
90
|
+
|
|
91
|
+
# Revert name (optional, but good practice in local builds)
|
|
92
|
+
jq '.name = "pruny"' package.json > package.json.tmp && mv package.json.tmp package.json
|
|
93
|
+
env:
|
|
94
|
+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|