Release #713
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
name: Release | |
on: | |
workflow_dispatch: | |
inputs: | |
package: | |
description: 'Package' | |
required: true | |
type: choice | |
options: | |
- anatomy | |
- react | |
- solid | |
- vue | |
increment: | |
description: 'Increment' | |
required: true | |
default: 'patch' | |
type: choice | |
options: | |
- major | |
- minor | |
- patch | |
preRelease: | |
description: 'Pre Release' | |
required: true | |
default: 'skip' | |
type: choice | |
options: | |
- create | |
- continue | |
- skip | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Branch | |
uses: actions/checkout@v4 | |
- name: Setup Git User | |
shell: bash | |
run: | | |
git config --global user.name "$(git --no-pager log --format=format:'%an' -n 1)" | |
git config --global user.email "$(git --no-pager log --format=format:'%ae' -n 1)" | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v2 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
registry-url: 'https://registry.npmjs.org' | |
cache: 'pnpm' | |
- name: Install | |
run: pnpm install | |
- name: Build | |
run: pnpm ${{ github.event.inputs.package }} build | |
- name: Create Pre-Release | |
if: github.event.inputs.preRelease == 'create' | |
run: pnpm ${{ github.event.inputs.package }} release-it ${{ github.event.inputs.increment }} --preRelease=beta --ci | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
- name: Continue Pre-Release | |
if: github.event.inputs.preRelease == 'continue' | |
run: pnpm ${{ github.event.inputs.package }} release-it --preRelease --ci | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
- name: Release | |
if: github.event.inputs.preRelease == 'skip' | |
run: pnpm ${{ github.event.inputs.package }} release-it --ci --increment ${{ github.event.inputs.increment }} | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
- name: Notification | |
if: github.event.inputs.preRelease == 'skip' | |
uses: slackapi/slack-github-action@v1.25.0 | |
with: | |
payload: | | |
{ | |
"package_name": "@ark-ui/${{ github.event.inputs.package }}", | |
"changelog_url": "https://ark-ui.com/docs/changelog/${{ github.event.inputs.package }}" | |
} | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |