Skip to content

Commit

Permalink
😅Stop trying to program shit in YAML
Browse files Browse the repository at this point in the history
  • Loading branch information
masonmark committed Jun 16, 2024
1 parent e294caa commit f496897
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/jsr-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ jobs:

- name: Publish libs/ts/assert-never
working-directory: libs/ts/assert-never
run: deno run --allow-read --allow-net ../jsr-metadata/local-version-is-newer.deno.ts && npx jsr publish
run: deno run --allow-read --allow-net --allow-run ../jsr-metadata/publish-if-local-version-is-newer.deno.ts

- name: Publish libs/ts/date
working-directory: libs/ts/date
run: deno run --allow-read --allow-net ../jsr-metadata/local-version-is-newer.deno.ts && npx jsr publish
run: deno run --allow-read --allow-net --allow-run ../jsr-metadata/publish-if-local-version-is-newer.deno.ts

- name: Publish libs/ts/detect-runtime
working-directory: libs/ts/detect-runtime
run: deno run --allow-read --allow-net ../jsr-metadata/local-version-is-newer.deno.ts && npx jsr publish
run: deno run --allow-read --allow-net --allow-run ../jsr-metadata/publish-if-local-version-is-newer.deno.ts

2 changes: 1 addition & 1 deletion libs/ts/assert-never/jsr.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@axhxrx/assert-never",
"version": "0.1.7",
"version": "0.1.8",
"exports": "./mod.ts"
}
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,29 @@ console.log('JSR version is old:', isOld);
if (!isOld)
{
console.log('Doing nothing and exiting with exit status 1');
Deno.exit(1);
Deno.exit(0);
}
else
{
console.log('Will exit with status 0');
console.log('🚀🚀🚀 PUBLISHING... ');
const publishCommand = new Deno.Command("npx", {
args: ["jsr", "publish"],
stdout: "piped",
stderr: "piped",
});

const { code, stdout, stderr } = await publishCommand.output();

if (code === 0) {
console.log('✅ Published successfully!');
} else {
console.error('❌ Failed to publish.');
const errorString = new TextDecoder().decode(stderr);
console.error(errorString);
const outputString = new TextDecoder().decode(stdout);
console.log(outputString);
Deno.exit(code);
}

Deno.exit(0);
}

0 comments on commit f496897

Please sign in to comment.