Skip to content

v0.14.1

v0.14.1 #16

Workflow file for this run

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 v18.x
uses: actions/setup-node@v3
with:
node-version: v18.x
cache: 'pnpm'
- name: πŸ” Install dependencies
run: pnpm install
- name: πŸ”§ Build package
run: pnpm build
- name: πŸ“œ Copy README
run: cp ./README.md ./dist/
- name: πŸ§ͺ Test
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
package: 'dist/'
- name: πŸ“ Create NPM config
working-directory: './dist/'
run: npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: πŸš€ Publish package
working-directory: './dist/'
run: npm publish