fix!: export as ESM #3
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: | |
| tags: | |
| - v* | |
| branches: | |
| - main | |
| paths: | |
| - 'src/**' | |
| - '.github/workflows/npm-publish.yml' | |
| workflow_dispatch: | |
| permissions: | |
| id-token: write | |
| contents: write | |
| jobs: | |
| npm-publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v3 | |
| with: | |
| version: 9 | |
| - name: Use Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: pnpm | |
| - run: pnpm install | |
| - name: Creating .npmrc | |
| run: | | |
| cat << EOF > "$HOME/.npmrc" | |
| //registry.npmjs.org/:_authToken=$NPM_TOKEN | |
| EOF | |
| env: | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| - name: Initialize mandatory git config | |
| run: | | |
| git config user.name "GitHub actions" | |
| git config user.email [email protected] | |
| - name: Release | |
| env: | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: npx changelogen@latest --release --push --publish |