Skip to content

chore: set up NPM auto publish on commit #14

chore: set up NPM auto publish on commit

chore: set up NPM auto publish on commit #14

Workflow file for this run

name: npm-publish
on:
push:
branches:
- chore/auto_publish # Change this to your default branch
jobs:
npm-publish:
name: npm-publish
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Check version changes
uses: EndBug/version-check@v2
id: check
- name: Version update detected
if: steps.check.outputs.changed == 'true'
run: 'echo "Version change found! New version: ${{ steps.check.outputs.version }} (${{ steps.check.outputs.type }})"'
- name: Draft release
if: steps.check.outputs.changed == 'true'
run: 'gh release create v${{ steps.check.outputs.version }} -d --notes ""'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}