Skip to content

Commit

Permalink
workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
saadeghi committed Sep 17, 2023
1 parent 399fa6a commit 6cbf831
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions .github/workflows/release-new-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ name: "🎉 Release new version"
on:
workflow_dispatch:
inputs:
runtime:
type: choice
description: JS runtime
default: "bun"
options:
- "bun"
- "npm"
release-type:
type: choice
description: Release type
Expand All @@ -22,24 +29,34 @@ jobs:
release:
if: github.repository == 'saadeghi/daisyui'
runs-on: ubuntu-latest
env:
runtime: ${{ !github.event.inputs.runtime && 'bun'}}
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node
if: env.runtime == 'npm'
uses: actions/setup-node@v3
with:
node-version: "latest"
registry-url: https://registry.npmjs.org

- name: Setup bun
if: env.runtime == 'bun'
uses: oven-sh/setup-bun@v1

- name: Install package dependencies
run: bun install
run: ${{ env.runtime }} install

- name: build package
run: bun run build
run: ${{ env.runtime }} run build

- name: Release
run: |
git config --local user.email "[email protected]"
git config --local user.name "Pouya Saadeghi"
bun run release${{ github.event.inputs.release-type }}
${{ env.runtime }} run release${{ github.event.inputs.release-type }}
- name: get-npm-version
id: package-version
Expand Down Expand Up @@ -70,6 +87,7 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Setup Node.js
if: env.runtime != 'npm'
uses: actions/setup-node@v3
with:
node-version: "latest"
Expand Down

0 comments on commit 6cbf831

Please sign in to comment.