This file contains hidden or 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
name: "π Release new version" | |
on: | |
workflow_dispatch: | |
inputs: | |
release-type: | |
type: choice | |
description: Release type | |
options: | |
- "patch" | |
- "minor" | |
push: | |
branches: | |
- master | |
paths: | |
- "packages/daisyui/**" | |
jobs: | |
build-publish: | |
name: π¨ Build + π Publish | |
timeout-minutes: 10 | |
runs-on: ubuntu-latest | |
outputs: | |
daisyuiversion: ${{ steps.package-version.outputs.version }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
clean: false | |
- name: Setup Bun | |
uses: oven-sh/setup-bun@v1 | |
- name: Install dependencies | |
run: bun i | |
- name: Build package | |
run: bun run build | |
- name: Run release command | |
# if: github.repository == 'saadeghi/daisyui' | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "Pouya Saadeghi" | |
bunx commit-and-tag-version -- --release-as ${{ inputs.release-type }} --bumpFiles --header --packageFiles packages/daisyui/package.json | |
- name: Read package version from package.json | |
id: package-version | |
run: | | |
version=$(grep -o '"version": *"[^"]*"' packages/daisyui/package.json | cut -d'"' -f4) | |
echo version=$version >> $GITHUB_OUTPUT | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Publish package to NPM | |
# if: github.repository == 'saadeghi/daisyui' | |
run: cd packages/daisyui && bun publish | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | |
deploy-docs: | |
name: π Docs | |
needs: build-publish | |
uses: ./.github/workflows/deploy-docs.yml | |
secrets: inherit | |
run-tests: | |
name: π§ͺ Tests | |
needs: build-publish | |
uses: ./.github/workflows/run-tests.yml | |
secrets: inherit | |
with: | |
filter: "" | |
write-release-notes: | |
name: π Release notes | |
# if: github.repository == 'saadeghi/daisyui' | |
needs: build-publish | |
uses: ./.github/workflows/write-release-notes.yml | |
secrets: inherit | |
with: | |
daisyuiversion: ${{ needs.build-publish.outputs.daisyuiversion }} |