chore(deps): update dependency @types/node to v22 #526
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: 'Check version bump for bank2ynab-converter' | |
on: | |
pull_request: | |
branches: | |
- main | |
paths: | |
- packages/ynap-bank2ynab-converter/** | |
jobs: | |
version-bump: | |
permissions: | |
contents: read | |
packages: read | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 | |
with: | |
node-version: '18.x' | |
registry-url: 'https://npm.pkg.github.com' | |
cache: npm | |
cache-dependency-path: package-lock.json | |
- name: Get the latest published version from the registry | |
run: echo version=$(npm view @envelope-zero/ynap-bank2ynab-converter --json | jq -r .version) >> $GITHUB_OUTPUT | |
id: published | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- run: echo version=$(cat packages/ynap-bank2ynab-converter/package.json | jq -r .version) >> $GITHUB_OUTPUT | |
id: new | |
- uses: madhead/semver-utils@36d1e0ed361bd7b4b77665de8093092eaeabe6ba # v4.3.0 | |
id: comparison | |
with: | |
version: ${{ steps.new.outputs.version }} | |
compare-to: ${{ steps.published.outputs.version }} | |
- name: Verify that version is bumped | |
run: | | |
if [[ ">" != "${{ steps.comparison.outputs.comparison-result }}" ]]; then | |
echo "::error::The package version needs to be bumped when making changes in the module" && exit 1 | |
fi |