-
Notifications
You must be signed in to change notification settings - Fork 5
29 lines (24 loc) · 858 Bytes
/
init.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
on:
workflow_call:
outputs:
product-version:
value: ${{ jobs.init.outputs.product-version }}
product-version-major:
value: ${{ jobs.init.outputs.product-version-major }}
jobs:
init:
name: Initialize
runs-on: ubuntu-latest
outputs:
product-version: ${{ steps.version.outputs.product-version }}
product-version-major: ${{ steps.version.outputs.product-version-major }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Get Version
id: version
working-directory: ./
run: |
productVersion=$(cat version.txt)
majorVersion=$(echo "$productVersion" | cut -d'.' -f1)
echo "product-version=$productVersion" >> $GITHUB_OUTPUT
echo "product-version-major=$majorVersion" >> $GITHUB_OUTPUT