Skip to content

Drop CJS output, make package ESM only #16

Drop CJS output, make package ESM only

Drop CJS output, make package ESM only #16

Workflow file for this run

name: Release
on: [push]
env:
CI: true
jobs:
lint:
name: Lint codebase
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Node.js
uses: labd/gh-actions-typescript/pnpm-install@4d7a6c7088328753fdbacbb9204aae4e2b9b00e2 # 1.0.0
- name: Lint
run: pnpm lint
build:
name: Build, and test on Node ${{ matrix.node }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
needs: lint
strategy:
matrix:
node: ["22.x", "24.x"]
os: [ubuntu-latest, macOS-latest]
steps:
- name: Checkout repo
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Node.js
uses: labd/gh-actions-typescript/pnpm-install@4d7a6c7088328753fdbacbb9204aae4e2b9b00e2 # 1.0.0
with:
node-version: ${{ matrix.node }}
- name: Test
run: pnpm run test:ci
- name: Build
run: pnpm build
release:
timeout-minutes: 15
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
environment: release
needs: build
permissions:
id-token: write
contents: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Set up Node.js
uses: labd/gh-actions-typescript/pnpm-install@4d7a6c7088328753fdbacbb9204aae4e2b9b00e2 # 1.0.0
with:
node-version: 24.x
- name: Run build
run: pnpm build
- name: Upgrade npm for trusted publishing
run: npm i -g npm@11.12.1
- name: Create and publish versions
uses: changesets/action@6a0a831ff30acef54f2c6aa1cbbc1096b066edaf # v1.7.0
with:
title: "Release new version"
commit: "update version"
publish: pnpm publish:ci
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_CONFIG_PROVENANCE: true