forked from leolabs/you-need-a-parser
-
Notifications
You must be signed in to change notification settings - Fork 2
46 lines (38 loc) · 1.49 KB
/
version-bump-bank2ynab-converter.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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