Skip to content

Commit 36954e3

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 36954e3

File tree

7 files changed

+30
-14
lines changed

7 files changed

+30
-14
lines changed

‎.changeset/deep-cats-shop.md‎

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

‎.github/workflows/release.yaml‎

Lines changed: 4 additions & 4 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 }}
3838

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: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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(
13+
"deno.json",
14+
denoJsonContent.replace(/"version":\s*"[^"]*"/, `"version": "${newVersion}"`),
15+
);

‎version.sh‎

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

0 commit comments

Comments
 (0)