release #43
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 | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
type: choice | |
description: Version number to increment | |
required: true | |
default: minor | |
options: | |
- patch | |
- minor | |
- major | |
jobs: | |
release: | |
env: | |
CI: true | |
GITHUB_TOKEN: ${{ secrets.ACTION_GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # Need history for changelog generation | |
- uses: asdf-vm/actions/install@v3 | |
- run: pnpm i --frozen-lockfile | |
- name: types | |
run: pnpm check:types | |
- name: build | |
run: pnpm build | |
- name: test | |
id: test | |
if: ${{ always() }} | |
run: pnpm test:coverage | |
- name: lint | |
if: ${{ always() }} | |
run: pnpm lint | |
- name: style | |
if: ${{ always() }} | |
run: pnpm format:check | |
- name: npm registry auth | |
run: pnpm config set "//registry.npmjs.org/:_authToken" ${{ env.NPM_TOKEN }} | |
- name: config git user | |
run: | | |
git config --global user.name ${{ secrets.ACTION_GITHUB_USERNAME }}; | |
git config --global user.email ${{ secrets.ACTION_GITHUB_EMAIL }}; | |
- name: perform release | |
run: | | |
pnpm release \ | |
${{ github.event.inputs.version }} \ | |
--ci | |
- name: codecov # Perform after version publishing | |
if: steps.test.outcome == 'success' | |
uses: codecov/codecov-action@v4 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |