-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathcheck-release-candidate-version.yml
More file actions
36 lines (31 loc) · 1.04 KB
/
check-release-candidate-version.yml
File metadata and controls
36 lines (31 loc) · 1.04 KB
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
name: Check version
on:
workflow_call:
outputs:
next-version:
description: Next version
value: ${{ jobs.check-version.outputs.next_version }}
#permissions:
# contents: read
permissions:
contents: read
jobs:
check-version:
name: 'Check release candidate version'
runs-on: ubuntu-latest
permissions:
contents: write
outputs:
next_version: ${{ steps.next-version.outputs.next_version }}
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
fetch-depth: 2
- name: Get new version
id: next-version
run: echo "next_version=$(git diff HEAD^ HEAD --diff-filter=ACMRT -- release-candidate/plugin.yaml -- -U0 | awk '/^\+\s*version:/ {print $2}' | grep -Po '\d+\.\d+\.\d+(-[a-zA-Z0-9.]+)?')" >> $GITHUB_OUTPUT