devscard/.github/workflows/dependency-update-changelog.yml

38 lines
1.2 KiB
YAML

name: Modify changelog for dependency updates
on:
pull_request:
types: [labeled]
jobs:
build:
if: github.event.label.name == 'dependencies' && github.repository == 'KonradSzwarc/devscard'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- name: Get project information
id: projectinfo
uses: gregoranders/nodejs-project-info@v0.0.19
- name: Get next possible versions
id: semvers
uses: WyriHaximus/github-action-next-semvers@v1
with:
version: ${{ steps.projectinfo.outputs.version }}
- name: Update package.json version
uses: reedyuk/npm-version@1.1.1
with:
version: ${{ steps.semvers.outputs.patch }}
- name: Update CHANGELOG.md
uses: actions/github-script@v6
with:
script: |
const script = require('.github/scripts/update-changelog.js');
const version = '${{ steps.semvers.outputs.patch }}';
const prUrl = '${{ github.event.pull_request.url }}';
script(version, prUrl);
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4