-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
21 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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 | ||
|
@@ -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" | ||
|