Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 0 additions & 35 deletions .github/workflows/auto-version-bump.yml

This file was deleted.

33 changes: 30 additions & 3 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,36 @@
name: NPM publish
on:
workflow_call:
pull_request:
types: [ closed ]
branches: ['develop']

jobs:
build:
version-bump:
name: 'Bump version and commit package.json'
runs-on: ubuntu-latest
environment: production
if: github.event.pull_request.merged == true
steps:
- name: 'Checkout source code'
uses: 'actions/checkout@v4'
with:
token: ${{ secrets.BOT_USER_TOKEN }}
ref: 'develop'

- name: 'Automated Version Bump'
id: version-bump
uses: 'phips28/gh-action-bump-version@master'
env:
GITHUB_TOKEN: ${{ secrets.BOT_USER_TOKEN }}
with:
patch-wording: '[npm release]'
tag-prefix: 'v'
target-branch: 'develop'

npm-publish:
name: 'npm publish'
needs: version-bump
if: startsWith(github.event.pull_request.title, '[npm publish]')
runs-on: ubuntu-latest
environment: production
permissions:
Expand All @@ -16,7 +43,7 @@ jobs:
ref: develop

- name: 'Show current version'
run: grep '"version"' package.json
run: grep '"version"' package.json

- name: Setup Node.js environment
uses: actions/setup-node@v4
Expand Down
Loading