Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ jobs:
- name: Install
run: pnpm install

- name: Build
run: pnpm build

- name: Preview Release
if: matrix.os == 'ubuntu-latest' && matrix.node == 22
run: pnpx pkg-pr-new publish --compact --commentWithSha --no-template --pnpm './packages/*'

- name: Format
run: pnpm fmt --check

Expand All @@ -53,10 +60,5 @@ jobs:
- name: Typecheck
run: pnpm typecheck

- name: Build
run: pnpm build

- name: Test
run: pnpm test
env:
MOCHA_THROW_DEPRECATION: false
76 changes: 76 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Publish

on:
workflow_dispatch:
inputs:
release-type:
type: choice
description: Type of the release
required: true
default: patch
options:
- patch
- minor
- major

permissions:
contents: write
id-token: write

concurrency: publish

jobs:
publish:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Install pnpm
uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4.4.0

- name: Set node version to 22
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 22
cache: pnpm

# OIDC requires updated npm even when pnpm is used
- name: Update npm
run: |
npm --version
npm install -g npm@latest
npm --version

- name: Install
run: pnpm install

- name: Build
run: pnpm build

- name: Test
run: pnpm test

- name: Configure github-actions git
run: |
git config --global user.name 'github-actions'
git config --global user.email 'github-actions@users.noreply.github.com'

- name: Bump version
# Recursive mode always skips git commit and tag, so create them manually
run: |
pnpm version -r ${{ inputs.release-type }}
VERSION=$(node -p "require('./package.json').version")
git commit -am "chore: release v$VERSION"
git tag "v$VERSION"

- name: Publish to npm
run: pnpm publish -r

- name: Push release tag
run: git push origin main --follow-tags

- run: pnpm exec changelogithub
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"@e18e/eslint-plugin": "catalog:",
"@types/node": "catalog:",
"@vitest/coverage-v8": "catalog:",
"changelogithub": "catalog:",
"oxfmt": "catalog:",
"oxlint": "catalog:",
"typescript": "catalog:",
Expand Down
3 changes: 3 additions & 0 deletions packages/istanbul-lib-coverage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
"type": "module",
"types": "./dist/index.d.mts",
"exports": "./dist/index.mjs",
"publishConfig": {
"access": "public"
},
"scripts": {
"build": "tsdown",
"test": "pnpm --filter @vitest/istanbuljs-monorepo run test --project @vitest/istanbul-lib-coverage"
Expand Down
3 changes: 3 additions & 0 deletions packages/istanbul-lib-instrument/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
"type": "module",
"types": "./dist/index.d.mts",
"exports": "./dist/index.mjs",
"publishConfig": {
"access": "public"
},
"scripts": {
"build": "tsdown",
"test": "pnpm --filter @vitest/istanbuljs-monorepo run test --project @vitest/istanbul-lib-instrument"
Expand Down
3 changes: 3 additions & 0 deletions packages/istanbul-lib-report/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
"type": "module",
"types": "./dist/index.d.mts",
"exports": "./dist/index.mjs",
"publishConfig": {
"access": "public"
},
"scripts": {
"build": "tsdown",
"test": "pnpm --filter @vitest/istanbuljs-monorepo run test --project @vitest/istanbul-lib-report"
Expand Down
3 changes: 3 additions & 0 deletions packages/istanbul-lib-source-maps/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
"type": "module",
"types": "./dist/index.d.mts",
"exports": "./dist/index.mjs",
"publishConfig": {
"access": "public"
},
"scripts": {
"build": "tsdown",
"test": "pnpm --filter @vitest/istanbuljs-monorepo run test --project @vitest/istanbul-lib-source-maps"
Expand Down
Loading
Loading