Merge branch 'main' into dependabot/npm_and_yarn/document-conversion/… #3
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Bump Version Workflow | ||
on: | ||
pull_request: | ||
types: [opened, synchronize] | ||
branches: | ||
- main | ||
paths: | ||
- 'document-conversion/package.json' | ||
- 'document-conversion/package-lock.json' | ||
jobs: | ||
bump-version: | ||
if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' && contains(github.event.pull_request.title, 'Upgrade') && contains(github.event.pull_request.title, '/document-conversion') }} | ||
runs-on: ubuntu-latest | ||
if: > | ||
github.actor == 'dependabot[bot]' && | ||
contains(github.event.pull_request.labels.*.name, 'Upgrade: Bump') && | ||
contains(github.event.pull_request.title, 'Upgrade: Bump') && | ||
contains(github.event.pull_request.title, '/document-conversion') | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
persist-credentials: false | ||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '14' | ||
- name: Install npm dependencies | ||
run: npm install | ||
working-directory: ./document-conversion | ||
- name: Bump Version | ||
run: | | ||
cd document-conversion | ||
npm version patch --no-git-tag-version | ||
echo "New version $(cat package.json | jq -r '.version')" | ||
env: | ||
CI: true | ||
- name: Commit and push changes | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "GitHub Actions" | ||
git add document-conversion/package.json document-conversion/package-lock.json | ||
git commit -m "chore: bump version [skip ci]" | ||
git push | ||
env: | ||
GIT_COMMITTER_NAME: GitHub Actions | ||
GIT_COMMITTER_EMAIL: [email protected] | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |