Skip to content

Commit 2395d84

Browse files
Merge pull request #204 from RtlZeroMemory/chore/release-publish-ink
fix(release): publish ink-compat and shim packages
2 parents 56d4e70 + b8eb530 commit 2395d84

File tree

2 files changed

+25
-4
lines changed

2 files changed

+25
-4
lines changed

.github/workflows/release.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,21 @@ jobs:
208208
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
209209
run: npm publish -w @rezi-ui/jsx --access public
210210

211+
- name: Publish @rezi-ui/ink-compat
212+
env:
213+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
214+
run: npm publish -w @rezi-ui/ink-compat --access public
215+
216+
- name: Publish ink-gradient-shim
217+
env:
218+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
219+
run: npm publish ./packages/ink-gradient-shim --access public
220+
221+
- name: Publish ink-spinner-shim
222+
env:
223+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
224+
run: npm publish ./packages/ink-spinner-shim --access public
225+
211226
- name: Publish create-rezi
212227
env:
213228
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

scripts/release-set-version.mjs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { join, resolve } from "node:path";
44
import { fileURLToPath } from "node:url";
55

66
const ROOT = fileURLToPath(new URL("..", import.meta.url));
7+
const EXTRA_RELEASE_PACKAGE_DIRS = ["packages/ink-gradient-shim", "packages/ink-spinner-shim"];
78

89
function die(msg) {
910
process.stderr.write(`${msg}\n`);
@@ -63,6 +64,11 @@ function listWorkspaceDirs() {
6364
return out;
6465
}
6566

67+
function listReleasePackageDirs() {
68+
const dirs = [...listWorkspaceDirs(), ...EXTRA_RELEASE_PACKAGE_DIRS];
69+
return [...new Set(dirs)].sort();
70+
}
71+
6672
function updateInternalDeps(pkgJson, nextVersion) {
6773
const depFields = ["dependencies", "devDependencies", "optionalDependencies", "peerDependencies"];
6874
for (const field of depFields) {
@@ -76,10 +82,10 @@ function updateInternalDeps(pkgJson, nextVersion) {
7682
}
7783
}
7884

79-
const workspaceDirs = listWorkspaceDirs();
80-
if (workspaceDirs.length === 0) die("release-set-version: no workspaces discovered");
85+
const releasePackageDirs = listReleasePackageDirs();
86+
if (releasePackageDirs.length === 0) die("release-set-version: no release packages discovered");
8187

82-
for (const relDir of workspaceDirs) {
88+
for (const relDir of releasePackageDirs) {
8389
const pkgPath = join(ROOT, relDir, "package.json");
8490
if (!statSync(pkgPath, { throwIfNoEntry: false })) continue;
8591
const pkgJson = readJson(pkgPath);
@@ -92,5 +98,5 @@ for (const relDir of workspaceDirs) {
9298
}
9399

94100
process.stdout.write(
95-
`release-set-version: set version=${version} for ${workspaceDirs.length} workspace(s)\n`,
101+
`release-set-version: set version=${version} for ${releasePackageDirs.length} package(s)\n`,
96102
);

0 commit comments

Comments
 (0)