Skip to content

Release

Release #5

Workflow file for this run

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 }}