Skip to content

Commit ca40c46

Browse files
authored
chore(ci): fix post release workflow (#1638)
1 parent 6fa09b2 commit ca40c46

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Diff for: .github/workflows/post-release.yml

+9
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,15 @@ jobs:
2424
RELEASE_VERSION: ${{ inputs.versionNumber }}
2525
steps:
2626
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
27+
- name: Get release version
28+
run: |
29+
# The code below does the following:
30+
# 1. If the workflow was triggered manually, it will use the version number provided by the user
31+
# 2. If the workflow was triggered by a release, it will use the version number of the release
32+
if [ -z "$RELEASE_VERSION" ]; then
33+
export RELEASE_VERSION=$(git describe --tags --abbrev=0)
34+
fi
35+
echo "RELEASE_VERSION=$RELEASE_VERSION" >> $GITHUB_ENV
2736
- name: Update issues related to release
2837
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1
2938
with:

0 commit comments

Comments
 (0)