Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: publish to JSR added #5

Merged
merged 1 commit into from
Apr 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/publish-jsr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Publish JSR package

on:
release:
types: [published]

jobs:
publish-jsr:
runs-on: ubuntu-latest

permissions:
contents: read
id-token: write

steps:
- uses: actions/checkout@v4

- name: Lint source code
run: |
deno task lint

- name: Lint package
run: |
npx jsr publish --dry-run

- name: Unit tests
run: |
deno test

- name: Set version
run: |
cat deno.json | jq '.version = "${{ github.event.release.tag_name }}"' | tee deno.json

- name: Publish package
run: |
npx jsr publish
5 changes: 0 additions & 5 deletions .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ jobs:
run: |
deno test

- name: Get tag version
if: startsWith(github.ref, 'refs/tags/')
id: get_tag_version
run: echo TAG_VERSION=${GITHUB_REF/refs\/tags\//} >> $GITHUB_OUTPUT

- uses: actions/setup-node@v3
with:
node-version: '20.x'
Expand Down
Loading