chore: Simplify package.json#exports
#20
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: | |
push: | |
branches: [main] | |
defaults: | |
run: | |
shell: bash | |
env: | |
CI: true | |
permissions: | |
contents: write # to create release (changesets/action) | |
id-token: write # OpenID Connect token needed for provenance | |
pull-requests: write # to create pull request (changesets/action) | |
concurrency: ${{ github.workflow }}-${{ github.ref }} | |
jobs: | |
changesets: | |
name: Release | |
runs-on: macos-latest | |
timeout-minutes: 1 | |
steps: | |
# https://github.com/actions/checkout | |
- uses: actions/checkout@v4 | |
# TODO: Remove this step once this issue is resolved: https://github.com/pnpm/pnpm/issues/9029 | |
- run: npm install --global corepack | |
- name: Enable corepack (for pnpm) | |
# https://nodejs.org/api/corepack.html | |
run: corepack enable | |
# https://github.com/actions/setup-node | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
cache: pnpm | |
node-version-file: ".node-version" | |
- name: Install Node.js dependencies with pnpm | |
# https://pnpm.io/cli/install | |
run: > | |
pnpm install | |
--frozen-lockfile | |
# https://github.com/changesets/action | |
- name: Create release Pull Request / publish to npmjs.com registry | |
uses: changesets/action@v1 | |
if: ${{ github.ref_name == 'main' && github.repository_owner == 'xeho91' }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
with: | |
title: "chore(Changesets): Versioning package(s)" | |
publish: "pnpm run _cr:publish" | |
version: "pnpm run _cr:version" |