Publish package #40
Workflow file for this run
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: Publish package | |
| on: | |
| push: | |
| tags: | |
| - v*.*.* | |
| workflow_dispatch: | |
| jobs: | |
| publish-to-npm: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| registry-url: 'https://registry.npmjs.org' | |
| scope: ${{ github.repository_owner }} | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build | |
| run: pnpm build | |
| - name: Publish 🚀 | |
| run: pnpm publish --no-git-checks --access=public | |
| working-directory: dist | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} | |
| publish-to-github: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| registry-url: 'https://npm.pkg.github.com' | |
| scope: ${{ github.repository_owner }} | |
| cache: pnpm | |
| - name: Auth in GitHub private registry npm | |
| run: | | |
| echo "//npm.pkg.github.com/:_authToken=${{ github.token }}" > .npmrc | |
| echo "@1inch:registry=https://npm.pkg.github.com" >> .npmrc | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build | |
| run: pnpm build | |
| - name: Publish 🚀 | |
| run: pnpm publish --no-git-checks | |
| working-directory: dist | |
| env: | |
| NODE_AUTH_TOKEN: ${{ github.token }} |