@ceylar/ada 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/publish.yml +2 -3
- package/.github/workflows/test-version-on-pr.yml +38 -0
- package/package.json +1 -1
- package/bin/index.js +0 -8787
- package/bin/resources/eslint.config.mjs +0 -67
- package/bin/resources/prettier.config.mjs +0 -12
- package/bin/resources/stylelint.config.mjs +0 -7
- package/bin/resources/tsconfig.json +0 -37
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
name: Version Check
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
branches: [main]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
check-version:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
steps:
|
|
11
|
+
- uses: actions/checkout@v4
|
|
12
|
+
with:
|
|
13
|
+
fetch-depth: 0
|
|
14
|
+
|
|
15
|
+
- name: Get base (target) branch version
|
|
16
|
+
id: base-version
|
|
17
|
+
run: |
|
|
18
|
+
git fetch origin ${{ github.base_ref }}
|
|
19
|
+
BASE_VERSION=$(git show origin/${{ github.base_ref }}:package.json | jq -r .version)
|
|
20
|
+
echo "base_version=$BASE_VERSION" >> $GITHUB_OUTPUT
|
|
21
|
+
|
|
22
|
+
- name: Get current (PR) branch version
|
|
23
|
+
id: pr-version
|
|
24
|
+
run: |
|
|
25
|
+
PR_VERSION=$(jq -r .version package.json)
|
|
26
|
+
echo "pr_version=$PR_VERSION" >> $GITHUB_OUTPUT
|
|
27
|
+
|
|
28
|
+
- name: Compare versions
|
|
29
|
+
run: |
|
|
30
|
+
BASE=${{ steps.base-version.outputs.base_version }}
|
|
31
|
+
PR=${{ steps.pr-version.outputs.pr_version }}
|
|
32
|
+
|
|
33
|
+
if [ "$BASE" = "$PR" ]; then
|
|
34
|
+
echo "::error::Version in package.json must be incremented! Current: $PR, expected higher than $BASE"
|
|
35
|
+
exit 1
|
|
36
|
+
fi
|
|
37
|
+
|
|
38
|
+
echo "Version increased from $BASE to $PR - validation passed"
|