v0.7.1 #18
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 CI | |
| on: | |
| release: | |
| types: [published] | |
| jobs: | |
| publish-to-npm: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v2 | |
| - name: Use Node.js 18.x | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: 18.x | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Build | |
| run: pnpm build | |
| - name: Run tests | |
| run: pnpm test | |
| env: | |
| CI: true | |
| - name: Extract version | |
| id: version | |
| uses: olegtarasov/[email protected] | |
| with: | |
| tagRegex: 'v(.*)' | |
| - name: Set version from release | |
| uses: reedyuk/[email protected] | |
| with: | |
| version: ${{ steps.version.outputs.tag }} | |
| git-tag-version: false | |
| - name: Create NPM config | |
| run: npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN | |
| env: | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| - name: Publish package | |
| run: npm publish |