Skip to content

Commit cd3e5f9

Browse files
committed
Updated workflows
1 parent e82be5b commit cd3e5f9

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

.github/workflows/notify.yml

+3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ jobs:
1010
runs-on: ubuntu-latest
1111

1212
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v4
15+
1316
- name: Determine version update type
1417
id: determine_version
1518
run: |

.github/workflows/release.yml

+8-6
Original file line numberDiff line numberDiff line change
@@ -34,21 +34,23 @@ jobs:
3434
- name: Extract version and previous tag
3535
id: extract_info
3636
run: |
37-
TAG_NAME=${GITHUB_REF#refs/tags/}
38-
VERSION=$TAG_NAME
39-
PREVIOUS_TAG=$(git describe --tags $(git rev-list --tags --skip=1 --max-count=1))
37+
VERSION=${GITHUB_REF#refs/tags/v}
38+
PREVIOUS_TAG=$(git describe --tags $(git rev-list --tags $GITHUB_SHA --skip=1 --max-count=1))
4039
echo "VERSION=$VERSION" >> $GITHUB_ENV
4140
echo "PREVIOUS_TAG=$PREVIOUS_TAG" >> $GITHUB_ENV
4241
4342
- name: Determine update type
4443
id: determine_update_type
4544
run: |
46-
IFS='.' read -r -a NEW_VERSION_PARTS <<< "${VERSION#v}"
45+
IFS='.' read -r -a NEW_VERSION_PARTS <<< "${VERSION}"
4746
IFS='.' read -r -a OLD_VERSION_PARTS <<< "${PREVIOUS_TAG#v}"
4847
49-
if [ "${NEW_VERSION_PARTS[0]}" -ne "${OLD_VERSION_PARTS[0]}" ]; then
48+
echo "New version parts: ${NEW_VERSION_PARTS[@]}"
49+
echo "Old version parts: ${OLD_VERSION_PARTS[@]}"
50+
51+
if [ "${NEW_VERSION_PARTS[0]}" != "${OLD_VERSION_PARTS[0]}" ]; then
5052
UPDATE_TYPE=major
51-
elif [ "${NEW_VERSION_PARTS[1]}" -ne "${OLD_VERSION_PARTS[1]}" ]; then
53+
elif [ "${NEW_VERSION_PARTS[1]}" != "${OLD_VERSION_PARTS[1]}" ]; then
5254
UPDATE_TYPE=minor
5355
else
5456
UPDATE_TYPE=patch

0 commit comments

Comments
 (0)