@preapexis/pi-kit 1.1.0 → 1.1.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.
@@ -2,8 +2,8 @@ name: Publish Package
2
2
 
3
3
  on:
4
4
  push:
5
- branches:
6
- - master
5
+ tags:
6
+ - "v*"
7
7
 
8
8
  jobs:
9
9
  publish:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@preapexis/pi-kit",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "description": "Personal Pi coding-agent kit with safety extensions, status UI, prompt workflows, skills, and themes.",
5
5
  "keywords": [
6
6
  "pi-package",
@@ -8,7 +8,7 @@ const rl = readline.createInterface({ input, output });
8
8
  const message =
9
9
  process.env.npm_config_msg ||
10
10
  process.argv.slice(2).join(" ") ||
11
- "chore: release";
11
+ "chore: update";
12
12
 
13
13
  function run(command, args) {
14
14
  console.log(`\n> ${command} ${args.join(" ")}\n`);
@@ -104,38 +104,41 @@ function updatePackageVersion(nextVersion) {
104
104
  }
105
105
 
106
106
  try {
107
- const shouldBump = await askYesNo(
108
- "Do you want to bump package version?",
109
- true
110
- );
111
- let nextVersion = null;
107
+ const shouldPublish = await askYesNo("Do you want to publish to npm?", false);
108
+
112
109
  let tag = null;
113
110
 
114
- if (shouldBump) {
115
- const bumpType = await askVersionType();
116
- const pkg = readJson("package.json");
111
+ if (shouldPublish) {
112
+ const shouldBump = await askYesNo(
113
+ "Do you want to bump package version?",
114
+ true
115
+ );
117
116
 
118
- nextVersion = bumpVersion(pkg.version, bumpType);
119
- tag = `v${nextVersion}`;
117
+ if (shouldBump) {
118
+ const bumpType = await askVersionType();
119
+ const pkg = readJson("package.json");
120
+ const nextVersion = bumpVersion(pkg.version, bumpType);
120
121
 
121
- updatePackageVersion(nextVersion);
122
+ updatePackageVersion(nextVersion);
123
+ tag = `v${nextVersion}`;
122
124
 
123
- console.log(`\nBumped version to ${nextVersion}\n`);
124
- }
125
+ console.log(`\nBumped version to ${nextVersion}\n`);
126
+ } else {
127
+ const pkg = readJson("package.json");
128
+ tag = `v${pkg.version}`;
125
129
 
126
- const shouldPublish = await askYesNo("Do you want to publish to npm?", false);
130
+ console.log(`\nUsing existing version tag: ${tag}\n`);
131
+ }
132
+ }
127
133
 
128
134
  run("git", ["add", "."]);
129
135
  run("git", ["commit", "-m", `"${message}"`]);
130
136
 
131
- if (tag) {
132
- run("git", ["tag", tag]);
133
- }
134
-
135
- run("git", ["push", "--follow-tags"]);
136
-
137
- if (shouldPublish) {
138
- run("npm", ["publish", "--access", "public"]);
137
+ if (shouldPublish && tag) {
138
+ run("git", ["tag", "-a", tag, "-m", tag]);
139
+ run("git", ["push", "--follow-tags"]);
140
+ } else {
141
+ run("git", ["push"]);
139
142
  }
140
143
 
141
144
  console.log("\nDone.\n");