Skip to content

chore: fix CI

chore: fix CI #2

Workflow file for this run

name: Publish to npm
on:
push:
branches:
- main
jobs:
release:
name: Publish
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm install
- name: Publish to npm
run: |
npm version patch
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add package.json package-lock.json
git commit -m "Bump version to $(cat package.json | jq -r .version)"
git push origin HEAD:main
- name: Publish to npm
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm publish
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
files: |
dist/**
package.json
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}