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
38 changes: 38 additions & 0 deletions .github/action/bump-npm-version/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Bump NPM Version


inputs:
bump:
description: 'Which version bump (patch, minor, major)'
required: true
default: 'patch'
type: choice
options:
- patch
- minor
- major

jobs:
bump:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Configure Git
run: |
git config user.name 'celobot'
git config user.email 'github-celobot@celonis.com'
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}

- name: Run npm version
run: |
npm install
npm version ${{ inputs.bump }} -m "chore: bump version to %s"
git push origin HEAD
git push origin --tags
28 changes: 22 additions & 6 deletions .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,29 @@
name: Build and publish Workflow
name: Build and Publish Workflow

on:
push:
branches: [ master ]
paths-ignore:
- 'package.json'
- '.github/**'
workflow_dispatch:
inputs:
bump:
description: 'Which version bump (patch, minor, major)'
required: true
default: 'patch'
type: choice
options:
- patch
- minor
- major

jobs:
version-bump:
runs-on: ubuntu-latest
steps:
- name: Bump NPM version
uses: ./.github/action/bump-npm-version
with:
bump: ${{ inputs.bump }}

build:
needs: version-bump
runs-on: ubuntu-latest
name: Npm install and npm build

Expand Down