-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (37 loc) · 1.15 KB
/
release_validation.yaml
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
name: Release Validation
on:
pull_request:
types: [opened, reopened, ready_for_review, synchronize]
jobs:
validation:
name: Validation
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install
if: ${{ github.event.head.user.login == 'act' }}
run: |
apt-get update
apt-get install -y unzip zip jq curl
- name: Latest Release Version
id: latest_version
uses: fangqiuming/[email protected]
- name: Current Version
id: current_version
run: |
echo "version=v$(cat package.json | jq -r '.version')" >> $GITHUB_OUTPUT
- name: Compare Versions
id: comparison
uses: fabriziocacicia/[email protected]
with:
first: ${{ steps.current_version.outputs.version }}
second: ${{ steps.latest_version.outputs.version }}
- name: Validate Version
run: |
if [ "${{ steps.comparison.outputs.result }}" == true ]; then
echo "Version is valid"
else
echo "Version is invalid"
exit 1
fi