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 2e98d5a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
20 changes: 8 additions & 12 deletions .github/workflows/jsr.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
name: jsr

env:
DENO_VERSION: 1.x

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

permissions:
contents: read
Expand All @@ -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/[email protected]
working-directory: packages/unplugin-typia
1 change: 0 additions & 1 deletion packages/unplugin-typia/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "@ryoppippi/unplugin-typia",
"type": "module",
"version": "0.0.0",
"description": "unplugin for typia",
"author": "ryoppippi",
"license": "MIT",
Expand Down

0 comments on commit 2e98d5a

Please sign in to comment.