Skip to content

Commit d43253f

Browse files
authored
fix: only set ELASTIC_CI_POST_VERSION when needed (Closes #2015) (#2016)
Signed-off-by: Adrien Mannocci <adrien.mannocci@elastic.co>
1 parent db40292 commit d43253f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.github/workflows/packages.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ on:
1616
permissions:
1717
contents: read
1818

19-
# Override the version if there is no tag release.
20-
env:
21-
ELASTIC_CI_POST_VERSION: ${{ startsWith(github.ref, 'refs/tags') && '' || github.run_id }}
22-
2319
jobs:
2420
build:
2521
runs-on: ubuntu-latest
@@ -28,6 +24,11 @@ jobs:
2824
- uses: actions/setup-python@v5
2925
with:
3026
python-version: "3.10"
27+
- name: Override the version if there is no tag release.
28+
run: |
29+
if [[ "${GITHUB_REF}" != refs/tags/* ]]; then
30+
echo "ELASTIC_CI_POST_VERSION=${{ github.run_id }}" >> "${GITHUB_ENV}"
31+
fi
3132
- name: Install wheel
3233
run: pip install --user wheel
3334
- name: Building universal wheel
@@ -41,4 +42,3 @@ jobs:
4142
path: |
4243
dist/*.whl
4344
dist/*tar.gz
44-

0 commit comments

Comments
 (0)