diff --git a/.github/workflows/post-release.yml b/.github/workflows/post-release.yml index 7d08af4771..8bcceb4573 100644 --- a/.github/workflows/post-release.yml +++ b/.github/workflows/post-release.yml @@ -24,6 +24,15 @@ jobs: RELEASE_VERSION: ${{ inputs.versionNumber }} steps: - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - name: Get release version + run: | + # The code below does the following: + # 1. If the workflow was triggered manually, it will use the version number provided by the user + # 2. If the workflow was triggered by a release, it will use the version number of the release + if [ -z "$RELEASE_VERSION" ]; then + export RELEASE_VERSION=$(git describe --tags --abbrev=0) + fi + echo "RELEASE_VERSION=$RELEASE_VERSION" >> $GITHUB_ENV - name: Update issues related to release uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1 with: