Skip to content

Commit ef8941b

Browse files
committed
ci: Update Main.yml
1 parent dd017b4 commit ef8941b

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

.github/workflows/main.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,16 @@
2525
distribution: zulu
2626
java-version: 17
2727

28-
# Remove old release drafts by using the curl request for the available releases with a draft flag
28+
# Set environment variables
29+
- name: Export Properties
30+
id: properties
31+
shell: bash
32+
run: |
33+
PROPERTIES="$(./gradlew properties --console=plain -q)"
34+
VERSION="$(echo "$PROPERTIES" | grep "^VERSION_NAME:" | cut -f2- -d ' ')"
35+
echo "version=$VERSION" >> $GITHUB_OUTPUT
36+
37+
# Remove old release drafts by using the curl request for the available releases with a draft flag
2938
- name: Remove Old Release Drafts
3039
env:
3140
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -39,6 +48,6 @@
3948
env:
4049
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4150
run: |
42-
gh release create v${{ needs.build.outputs.version }} \
51+
gh release create v${{ VERSION }} \
4352
--draft \
44-
--title "v${{ needs.build.outputs.version }}" \
53+
--title "v${{ VERSION }}" \

0 commit comments

Comments
 (0)