Skip to content

Commit

Permalink
chore(ci): rename config files and update workflows
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
hckhanh committed Mar 1, 2024
1 parent 2decca7 commit 65b4fdc
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ jobs:
name: Test
uses: ./.github/workflows/tests.yml
secrets: inherit
permissions:
contents: read
id-token: write
release:
name: Release
needs: test
Expand All @@ -23,8 +26,6 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Deno
uses: denoland/setup-deno@v1
- name: Install jq
uses: dcarbone/install-jq-action@v2
- name: Setup pnpm
Expand All @@ -40,12 +41,12 @@ jobs:
run: pnpm --package conventional-changelog-conventionalcommits --package semantic-release dlx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Update version in deno.json
- name: Update version for JSR registry
run: |
VERSION=$(node -p "require('./package.json').version")
jq --arg version "$VERSION" '.version = $version' deno.json > deno.json.tmp
mv deno.json.tmp deno.json
jq --arg version "$VERSION" '.version = $version' jsr.json > jsr.json.tmp
mv jsr.json.tmp jsr.json
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Publish package to JSR
if: env.VERSION != '0.0.0-development'
run: deno publish
run: pnpm dlx jsr publish
5 changes: 5 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ jobs:
lints:
name: Lints
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- name: Setup pnpm
Expand All @@ -28,6 +31,8 @@ jobs:
run: pnpm audit
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
run: pnpm npm audit signatures
- name: Verify the package for publishing performing all checks and validations
run: pnpm dlx jsr publish --dry-run
node:
name: Node
needs: lints
Expand Down
1 change: 1 addition & 0 deletions deno.json → jsr.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"*.yaml",
"*.config.ts",
".*rc.json",
"package.json",
"renovate.json",
"tsconfig.json"
]
Expand Down

0 comments on commit 65b4fdc

Please sign in to comment.