From f2defb28f7d54ada50a8e9d099f72cc47706ecaf Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Sat, 29 Jul 2023 14:22:19 +0200 Subject: [PATCH] chore(ci): fix post release workflow --- .github/workflows/post-release.yml | 9 +++++++++ 1 file changed, 9 insertions(+) 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: