Skip to content

Commit 65b4fdc

Browse files
author
Khánh Hoàng
committed
chore(ci): rename config files and update workflows
Renamed 'deno.json' to 'jsr.json' to reflect usage change and updated related GitHub workflows. Added checks and publishing validation in workflows, and removed Deno installation step due to changes in development environment.
1 parent 2decca7 commit 65b4fdc

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

.github/workflows/publish.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ jobs:
1010
name: Test
1111
uses: ./.github/workflows/tests.yml
1212
secrets: inherit
13+
permissions:
14+
contents: read
15+
id-token: write
1316
release:
1417
name: Release
1518
needs: test
@@ -23,8 +26,6 @@ jobs:
2326
- uses: actions/checkout@v4
2427
with:
2528
fetch-depth: 0
26-
- name: Install Deno
27-
uses: denoland/setup-deno@v1
2829
- name: Install jq
2930
uses: dcarbone/install-jq-action@v2
3031
- name: Setup pnpm
@@ -40,12 +41,12 @@ jobs:
4041
run: pnpm --package conventional-changelog-conventionalcommits --package semantic-release dlx semantic-release
4142
env:
4243
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43-
- name: Update version in deno.json
44+
- name: Update version for JSR registry
4445
run: |
4546
VERSION=$(node -p "require('./package.json').version")
46-
jq --arg version "$VERSION" '.version = $version' deno.json > deno.json.tmp
47-
mv deno.json.tmp deno.json
47+
jq --arg version "$VERSION" '.version = $version' jsr.json > jsr.json.tmp
48+
mv jsr.json.tmp jsr.json
4849
echo "VERSION=$VERSION" >> $GITHUB_ENV
4950
- name: Publish package to JSR
5051
if: env.VERSION != '0.0.0-development'
51-
run: deno publish
52+
run: pnpm dlx jsr publish

.github/workflows/tests.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ jobs:
1010
lints:
1111
name: Lints
1212
runs-on: ubuntu-latest
13+
permissions:
14+
contents: read
15+
id-token: write
1316
steps:
1417
- uses: actions/checkout@v4
1518
- name: Setup pnpm
@@ -28,6 +31,8 @@ jobs:
2831
run: pnpm audit
2932
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
3033
run: pnpm npm audit signatures
34+
- name: Verify the package for publishing performing all checks and validations
35+
run: pnpm dlx jsr publish --dry-run
3136
node:
3237
name: Node
3338
needs: lints

deno.json renamed to jsr.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"*.yaml",
1313
"*.config.ts",
1414
".*rc.json",
15+
"package.json",
1516
"renovate.json",
1617
"tsconfig.json"
1718
]

0 commit comments

Comments
 (0)