Skip to content

Commit

Permalink
fix workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
TamimiGitHub committed Jan 16, 2025
1 parent cc1305c commit ce1ce76
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 36 deletions.
28 changes: 0 additions & 28 deletions .github/workflows/bump.yml

This file was deleted.

22 changes: 14 additions & 8 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,34 @@
name: Publish to npm
name: Bump version

on:
push:
paths:
- 'package.json'
branches:
- main

jobs:
publish:
bump-version:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Node.js
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '18'
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: npm install
- name: Bump version
id: bump
run: |
git config user.name github-actions
git config user.email [email protected]
npm version patch
echo "New version: $(node -p "require('./package.json').version")"
git push
- name: Publish to npm
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}

0 comments on commit ce1ce76

Please sign in to comment.