st-registry-cli 1.0.0 → 1.3.2
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.
- package/.github/workflows/release.yml +28 -15
- package/chore/updatePackage.js +22 -0
- package/package.json +5 -2
|
@@ -1,21 +1,34 @@
|
|
|
1
|
-
name: Publish Package
|
|
1
|
+
name: Publish Package
|
|
2
|
+
|
|
2
3
|
on:
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*'
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
id-token: write # This is the "key" for Trusted Publishing
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
5
12
|
jobs:
|
|
6
|
-
|
|
13
|
+
publish:
|
|
7
14
|
runs-on: ubuntu-latest
|
|
8
|
-
permissions:
|
|
9
|
-
contents: read
|
|
10
|
-
id-token: write
|
|
11
15
|
steps:
|
|
12
|
-
- uses: actions/checkout@
|
|
13
|
-
|
|
14
|
-
- uses: actions/setup-node@
|
|
16
|
+
- uses: actions/checkout@v6 # Updated version as per your docs
|
|
17
|
+
|
|
18
|
+
- uses: actions/setup-node@v6
|
|
15
19
|
with:
|
|
16
|
-
node-version: '
|
|
17
|
-
registry-url
|
|
20
|
+
node-version: '24'
|
|
21
|
+
# CRITICAL: Do NOT include registry-url here.
|
|
22
|
+
# It forces npm to look for a secret token you don't have.
|
|
23
|
+
|
|
18
24
|
- run: npm ci
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
25
|
+
|
|
26
|
+
- name: Update Version
|
|
27
|
+
run: |
|
|
28
|
+
# Strip 'v' from tag (e.g. v1.3.0 -> 1.3.0)
|
|
29
|
+
CLEAN_VERSION=$(echo "${{ github.ref_name }}" | sed 's/^v//')
|
|
30
|
+
npm version $CLEAN_VERSION --no-git-tag-version
|
|
31
|
+
|
|
32
|
+
# The --provenance flag tells npm:
|
|
33
|
+
# "Don't look for a token. Use my GitHub OIDC identity instead."
|
|
34
|
+
- run: npm publish --provenance --access public
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import p from "../package.json" assert { type: "json" };
|
|
2
|
+
import fs from "fs";
|
|
3
|
+
import { program } from "commander";
|
|
4
|
+
|
|
5
|
+
let packageData = p;
|
|
6
|
+
|
|
7
|
+
program.argument("<version>", "New version to set in package.json");
|
|
8
|
+
|
|
9
|
+
program.parse();
|
|
10
|
+
|
|
11
|
+
const version = program.args[0];
|
|
12
|
+
|
|
13
|
+
if (!version) {
|
|
14
|
+
console.error("Please provide a version.");
|
|
15
|
+
process.exit(1);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
packageData.version = version.replace(/^v/, ""); // Remove leading 'v' if present
|
|
19
|
+
|
|
20
|
+
fs.writeFileSync("package.json", JSON.stringify(packageData, null, 2));
|
|
21
|
+
|
|
22
|
+
console.log(`Updated package.json to version ${version}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "st-registry-cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -14,7 +14,10 @@
|
|
|
14
14
|
"chalk": "^5.6.2",
|
|
15
15
|
"commander": "^14.0.3"
|
|
16
16
|
},
|
|
17
|
-
"bin":{
|
|
17
|
+
"bin": {
|
|
18
18
|
"spm": "index.js"
|
|
19
|
+
},
|
|
20
|
+
"repository": {
|
|
21
|
+
"url": "Stoppedwumm-Studios/spm"
|
|
19
22
|
}
|
|
20
23
|
}
|