Skip to content

Commit 9625e46

Browse files
github-actions[bot]Hebilicious
authored andcommitted
release: πŸ“¦ update packages version (#2)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent f483e82 commit 9625e46

File tree

7 files changed

+28
-15
lines changed

7 files changed

+28
-15
lines changed

β€Ž.changeset/deep-cats-shop.mdβ€Ž

Lines changed: 0 additions & 5 deletions
This file was deleted.

β€Ž.github/workflows/release.yamlβ€Ž

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ jobs:
3030
uses: changesets/action@v1
3131
with:
3232
commit: "chore(release): update release & CHANGELOG.md"
33-
title: "πŸ“¦ Update Packages Version"
33+
title: "release: πŸ“¦ update packages version"
3434
version: npm run version
35-
publish: echo "This should be the publish to npm command"
35+
publish: echo "This could be a publish to npm command"
3636
env:
3737
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38-
38+
3939
- name: Publish to jsr.io
40-
if: steps.changesets.outputs.published == 'true'
41-
run: npx @qingshaner/jsr-release publish --changesetReleases='${{ steps.changesets.outputs.publishedPackages }}'
40+
if: steps.changesets.outputs.hasChangesets == 'false'
41+
run: npx jsr publish

β€ŽCHANGELOG.mdβ€Ž

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# @hebilicious/cssforge
2+
3+
## 0.1.0
4+
5+
### Minor Changes
6+
7+
- a202035: Initial Release

β€Ždeno.jsonβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@hebilicious/cssforge",
3-
"version": "0.0.0",
3+
"version": "0.1.0",
44
"license": "MIT",
55
"exports": {
66
".": "./src/mod.ts",

β€Žpackage.jsonβ€Ž

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"name": "@hebilicious/cssforge",
3-
"version": "0.0.0",
3+
"version": "0.1.0",
4+
"type": "module",
45
"scripts": {
5-
"version": "npx @changesets/cli version && npx @qingshaner/jsr-release --allowDirty version --sync"
6+
"version": "npx @changesets/cli version && node sync-version.js"
67
}
78
}

β€Žsync-version.jsβ€Ž

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import fs from "node:fs";
2+
3+
// Read and parse package.json to get the new version
4+
const packageJsonFile = fs.readFileSync("package.json", "utf8");
5+
const packageJson = JSON.parse(packageJsonFile);
6+
const newVersion = packageJson.version;
7+
8+
// Read the deno.json file as a string
9+
const denoJsonContent = fs.readFileSync("deno.json", "utf8");
10+
11+
// Write the modified string back to deno.json
12+
fs.writeFileSync("deno.json", denoJsonContent.replace(/"version":\s*"[^"]*"/, `"version": "${newVersion}"`));

β€Žversion.shβ€Ž

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
Β (0)