Skip to content

chore: release v3.0.3 #42

chore: release v3.0.3

chore: release v3.0.3 #42

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
jobs:
build-release:
runs-on: ubuntu-latest
if: github.repository == 'tinylibs/tinybench'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install dependencies
run: pnpm install --ignore-scripts --frozen-lockfile
- name: Build
run: pnpm build
- name: Type check
run: pnpm typecheck
- name: Lint
run: pnpm lint
- name: Run unit tests
run: pnpm test
env:
FORCE_COLOR: 2
- name: Run examples
run: cd examples && pnpm all
publish-npm:
runs-on: ubuntu-latest
needs: build-release
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/
cache: pnpm
- name: Install dependencies
run: pnpm install --ignore-scripts --frozen-lockfile
- name: Read package.json version
id: package-version
uses: jaywcjlove/github-action-package@main
- name: Publish release
run: pnpm publish --no-git-checks
if: ${{ contains(steps.package-version.outputs.version, '-') == false }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish release candidate
if: ${{ contains(steps.package-version.outputs.version, '-rc') == true }}
run: pnpm publish --no-git-checks --tag next
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish beta release
if: ${{ contains(steps.package-version.outputs.version, '-beta') == true }}
run: pnpm publish --no-git-checks --tag beta
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish alpha release
if: ${{ contains(steps.package-version.outputs.version, '-alpha') == true }}
run: pnpm publish --no-git-checks --tag alpha
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
changelog:
runs-on: ubuntu-latest
needs: publish-npm
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npx changelogithub
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}