workflows
This commit is contained in:
parent
f08755c903
commit
39e71e04a2
|
@ -26,10 +26,10 @@ jobs:
|
|||
timeout-minutes: 10
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
runtime: ${{ github.event.inputs.runtime || 'npm'}}
|
||||
runtime: ${{ inputs.runtime || 'npm'}}
|
||||
LEMONSQUEEZY_API_KEY: ${{ secrets.LEMONSQUEEZY_API_KEY }}
|
||||
YOUTUBE_API_KEY: ${{ secrets.YOUTUBE_API_KEY }}
|
||||
daisyuiversion: ${{ github.event.inputs.daisyuiversion || 'latest' }}
|
||||
daisyuiversion: ${{ inputs.daisyuiversion || 'latest' }}
|
||||
if: |
|
||||
github.event_name == 'workflow_dispatch' ||
|
||||
github.event_name == 'workflow_call' ||
|
||||
|
|
|
@ -28,11 +28,10 @@ on:
|
|||
jobs:
|
||||
build-publish:
|
||||
name: 🔨 Build + 🚀 Publish
|
||||
if: github.repository == 'saadeghi/daisyui'
|
||||
timeout-minutes: 10
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
runtime: ${{ github.event.inputs.runtime || 'bun'}}
|
||||
runtime: ${{ inputs.runtime || 'bun'}}
|
||||
outputs:
|
||||
daisyuiversion: ${{ steps.package-version.outputs.version }}
|
||||
steps:
|
||||
|
@ -60,10 +59,11 @@ jobs:
|
|||
run: ${{ env.runtime }} run build
|
||||
|
||||
- name: Run release command
|
||||
if: github.repository == 'saadeghi/daisyui'
|
||||
run: |
|
||||
git config --local user.email "pouya.saadeghi@gmail.com"
|
||||
git config --local user.name "Pouya Saadeghi"
|
||||
${{ env.runtime }} run release${{ github.event.inputs.release-type }}
|
||||
${{ env.runtime }} run release${{ inputs.release-type }}
|
||||
|
||||
- name: Read package version from package.json
|
||||
id: package-version
|
||||
|
@ -72,6 +72,7 @@ jobs:
|
|||
echo version=$version >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Update package version in src/docs/.env and commit
|
||||
if: github.repository == 'saadeghi/daisyui'
|
||||
id: commit
|
||||
run: |
|
||||
echo "VITE_DAISYUI_VERSION=${{ steps.package-version.outputs.version }}" > src/docs/.env
|
||||
|
@ -100,6 +101,7 @@ jobs:
|
|||
registry-url: https://registry.npmjs.org
|
||||
|
||||
- name: Publish package to NPM
|
||||
if: github.repository == 'saadeghi/daisyui'
|
||||
run: npm publish
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
||||
|
|
|
@ -30,7 +30,7 @@ jobs:
|
|||
tests:
|
||||
timeout-minutes: 10
|
||||
env:
|
||||
filter: ${{ github.event.inputs.filter || ' '}}
|
||||
filter: ${{ inputs.filter || ' '}}
|
||||
name: "Tests"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
|
|
@ -20,7 +20,7 @@ jobs:
|
|||
- name: Read package version from package.json
|
||||
id: package-version
|
||||
run: |
|
||||
version=${{ github.event.inputs.daisyuiversion }}
|
||||
version=${{ inputs.daisyuiversion }}
|
||||
echo version=$version >> $GITHUB_OUTPUT
|
||||
if [[ $version =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
||||
echo $version is a stable version
|
||||
|
|
Loading…
Reference in New Issue