diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 270ccbd..2f5de08 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -10,7 +10,7 @@ permissions: id-token: write jobs: - publish: + compile: runs-on: ubuntu-latest strategy: @@ -61,7 +61,7 @@ jobs: release: name: Create GitHub Release - needs: publish + needs: compile runs-on: ubuntu-latest permissions: contents: write @@ -80,3 +80,25 @@ jobs: with: files: dist/**/*.tar.gz token: ${{ secrets.GITHUB_TOKEN }} + + publish: + runs-on: ubuntu-latest + + steps: + - name: checkout + uses: actions/checkout@v4 + + - name: setup deno + uses: denoland/setup-deno@v2 + with: + deno-version: v2.x + + - name: Get Version + id: vars + run: echo ::set-output name=version::$(echo ${{github.ref_name}} | sed 's/^v//') + + - name: Build JSR + run: deno task build:jsr ${{steps.vars.outputs.version}} + + - name: Publish JSR + run: deno publish --allow-dirty --token=${{secrets.JSR_TOKEN}}