Skip to content

Commit

Permalink
Merge pull request #5 from krutoo/ci-publish-jsr
Browse files Browse the repository at this point in the history
CI: publish to JSR added
  • Loading branch information
krutoo committed Apr 19, 2024
2 parents 965db21 + 6be2a8c commit 81362b6
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 5 deletions.
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

0 comments on commit 81362b6

Please sign in to comment.