Skip to content

Commit

Permalink
feat: Update GitHub Actions workflow for Deno
Browse files Browse the repository at this point in the history
This commit updates the GitHub Actions workflow to use Deno for
publishing. The version extraction steps have been removed and replaced
with a Deno script that handles publishing on tag creation. The workflow
now also sets the Deno version through an environment variable.
  • Loading branch information
ryoppippi committed Jun 11, 2024
1 parent 92ac06f commit cebc7cc
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions .github/workflows/jsr.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
name: jsr

env:
DENO_VERSION: 1.x

on:
push:
tags:
- "*"
- "v*"
workflow_dispatch:

permissions:
Expand All @@ -17,19 +20,14 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: denoland/setup-deno@v1
with:
deno-version: ${{ env.DENO_VERSION }}
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- run: bun i --frozen-lockfile
- id: get_version
name: Get version
uses: jannemattila/get-version-from-tag@v3
- name: jsr.json version to packge.json verion
run: |
jq --arg new_version "${{ steps.get_version.outputs.version }}" '.version = $new_version' package.json > package.tmp.json && mv package.tmp.json package.json
jq --arg new_version "${{ steps.get_version.outputs.version }}" '.version = $new_version' jsr.json > jsr.tmp.json && mv jsr.tmp.json jsr.json
working-directory: packages/unplugin-typia
- name: Publish
if: github.ref == 'refs/tags/v*'
run: bun run publish
run: deno run -A jsr:@david/publish[email protected]
working-directory: packages/unplugin-typia

0 comments on commit cebc7cc

Please sign in to comment.