From 2e98d5a8cee49feed8cba7848849debcb58b36d2 Mon Sep 17 00:00:00 2001 From: ryoppippi <1560508+ryoppippi@users.noreply.github.com> Date: Tue, 11 Jun 2024 16:27:25 +0100 Subject: [PATCH] feat: Update GitHub Actions workflow for Deno 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. --- .github/workflows/jsr.yaml | 20 ++++++++------------ packages/unplugin-typia/package.json | 1 - 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/.github/workflows/jsr.yaml b/.github/workflows/jsr.yaml index fac49bed..bc0a99e5 100644 --- a/.github/workflows/jsr.yaml +++ b/.github/workflows/jsr.yaml @@ -1,10 +1,12 @@ name: jsr +env: + DENO_VERSION: 1.x + on: push: tags: - - "*" - workflow_dispatch: + - "v*" permissions: contents: read @@ -17,19 +19,13 @@ 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-on-tag@0.1.4 working-directory: packages/unplugin-typia diff --git a/packages/unplugin-typia/package.json b/packages/unplugin-typia/package.json index 8a86ea3a..a2ddda15 100644 --- a/packages/unplugin-typia/package.json +++ b/packages/unplugin-typia/package.json @@ -1,7 +1,6 @@ { "name": "@ryoppippi/unplugin-typia", "type": "module", - "version": "0.0.0", "description": "unplugin for typia", "author": "ryoppippi", "license": "MIT",