Skip to content

Commit

Permalink
Merge pull request #83 from ryoppippi/feature/ci
Browse files Browse the repository at this point in the history
feat: Add GitHub workflow for publishing package
  • Loading branch information
ryoppippi authored Jun 11, 2024
2 parents 2a2df08 + 6c32126 commit 92ac06f
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 2 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/jsr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: jsr

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

permissions:
contents: read
id-token: write

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- 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
working-directory: packages/unplugin-typia
2 changes: 1 addition & 1 deletion packages/unplugin-typia/jsr.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ryoppippi/unplugin-typia",
"version": "0.3.10",
"version": "0.0.0",
"exports": {
".": "./src/index.ts",
"./api": "./src/api.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/unplugin-typia/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@ryoppippi/unplugin-typia",
"type": "module",
"version": "0.3.10",
"version": "0.0.0",
"description": "unplugin for typia",
"author": "ryoppippi",
"license": "MIT",
Expand Down

0 comments on commit 92ac06f

Please sign in to comment.