-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (35 loc) · 1.18 KB
/
update_pkg_stable_version.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
name: Update package - stable version
on:
pull_request:
types: [opened, synchronize, reopened]
branches:
- main
permissions:
contents: write
packages: write
jobs:
determine_version_type:
name: Determine version type
runs-on: ubuntu-latest
outputs:
version_type: ${{ steps.determine_version.outputs.version_type }}
steps:
- name: Identifying the type
id: determine_version
run: |
if [[ "${{ github.head_ref }}" == *"fix/"* ]]; then
echo "version_type=patch" >> $GITHUB_OUTPUT
elif [[ "${{ github.head_ref }}" == *"feature/"* ]]; then
echo "version_type=minor" >> $GITHUB_OUTPUT
elif [[ "${{ github.head_ref }}" == *"release/"* || "${{ github.head_ref }}" == *"major/"* ]]; then
echo "version_type=major" >> $GITHUB_OUTPUT
else
echo "Branch not recognized for automatic versioning."
exit 1
fi
update_pkg_stable_version:
name: Update package - Stable Version
needs: determine_version_type
uses: ./.github/workflows/update_pkg.yml
with:
command-type: ${{ needs.determine_version_type.outputs.version_type }}