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.
@@ -1,21 +1,34 @@
1
- name: Publish Package to npmjs
1
+ name: Publish Package
2
+
2
3
  on:
3
- release:
4
- types: [published]
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
- build:
13
+ publish:
7
14
  runs-on: ubuntu-latest
8
- permissions:
9
- contents: read
10
- id-token: write
11
15
  steps:
12
- - uses: actions/checkout@v5
13
- # Setup .npmrc file to publish to npm
14
- - uses: actions/setup-node@v4
16
+ - uses: actions/checkout@v6 # Updated version as per your docs
17
+
18
+ - uses: actions/setup-node@v6
15
19
  with:
16
- node-version: '20.x'
17
- registry-url: 'https://registry.npmjs.org'
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
- - run: npm publish --provenance --access public
20
- env:
21
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
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.0.0",
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
  }