Skip to content

Add .gitignore and remove ignored files #12

Add .gitignore and remove ignored files

Add .gitignore and remove ignored files #12

Workflow file for this run

name: Publish to npm
on:
push:
branches:
- main
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: '22.8.0'
registry-url: 'https://registry.npmjs.org/'
- name: Install pnpm
run: npm install -g pnpm
- run: pnpm install
- name: Commit changes if any
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
if [[ `git status --porcelain` ]]; then
git add .
git commit -m "Auto-commit: Save uncommitted changes before versioning"
fi
- run: npm version patch -m "Upgrade version to %s [skip ci]"
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}