Release #5
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: | |
version: | |
description: 'Version (optional)' | |
required: false | |
type: string | |
env: | |
CI: true | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
id-token: write | |
steps: | |
- uses: actions/[email protected] | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: latest | |
- uses: actions/[email protected] | |
with: | |
node-version: 20 | |
cache: pnpm | |
registry-url: 'https://registry.npmjs.org' | |
- name: Install | |
run: pnpm install | |
- name: Set Git username | |
run: |- | |
git config --global user.name "Release It" | |
git config --global user.email "[email protected]" | |
- name: Publish default version | |
if: ${{ inputs.version == '' }} | |
run: pnpm release-it --ci | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Publish | |
if: ${{ inputs.version }} | |
run: pnpm release-it --ci -i ${{ inputs.version }} | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |