Skip to content

Commit

Permalink
ci: Add JSR
Browse files Browse the repository at this point in the history
  • Loading branch information
Jiralite committed Dec 24, 2024
1 parent a8fc666 commit 798c4ea
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 19 deletions.
44 changes: 27 additions & 17 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,35 @@ on:
permissions:
id-token: write
jobs:
publish:
# npm:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4

# - name: Install Node.js 20
# uses: actions/setup-node@v4
# with:
# node-version: 20
# registry-url: https://registry.npmjs.org

# - name: Install dependencies
# uses: pnpm/action-setup@v4
# with:
# version: 9.14.2
# run_install: |
# - args: [--frozen-lockfile]

# - name: Publish package
# run: pnpm publish --provenance --no-git-checks
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
jsr:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4

- name: Install Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org

- name: Install dependencies
uses: pnpm/action-setup@v4
with:
version: 9.14.2
run_install: |
- args: [--frozen-lockfile]
- name: Publish package
run: pnpm publish --provenance --no-git-checks
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
run: pnpm dlx jsr publish --dry-run
8 changes: 6 additions & 2 deletions jsr.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{
"$schema": "https://jsr.io/schema/config-file.v1.json",
"name": "@runescape/runescape",
"version": "0.9.0",
"exports": "./source/index.ts"
"version": "0.10.4",
"exports": "./source/index.ts",
"publish": {
"include": ["source/", "README.md"]
}
}

0 comments on commit 798c4ea

Please sign in to comment.