Skip to content

Commit 89f91a1

Browse files
committed
ci: add version to release build artifact names
1 parent bd673c1 commit 89f91a1

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

.github/workflows/release_builds.yaml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,32 @@ jobs:
2626

2727
steps:
2828
- name: Checkout repository
29-
uses: actions/checkout@v4
29+
uses: actions/checkout@v5
30+
with:
31+
fetch-depth: 0
3032

3133
- name: Setup Python
3234
uses: actions/setup-python@v5
3335
with:
3436
python-version: '3.11'
3537
cache: 'pip'
3638

39+
- name: Get version from setuptools_scm
40+
shell: bash
41+
run: |
42+
pip install setuptools-scm
43+
ver=$(python -c "import setuptools_scm; print(setuptools_scm.get_version())")
44+
echo "VERSION=$ver" >> $GITHUB_ENV
45+
echo "Version: $ver"
46+
3747
- name: Install packages
48+
env:
49+
SETUPTOOLS_SCM_PRETEND_VERSION: ${{ env.VERSION }}
3850
run: pip install . build twine pyinstaller
3951

4052
- name: Build wheel and source distribution
53+
env:
54+
SETUPTOOLS_SCM_PRETEND_VERSION: ${{ env.VERSION }}
4155
run: python -m build
4256

4357
- name: Check distribution files
@@ -62,15 +76,15 @@ jobs:
6276
- name: Upload PyInstaller artifacts
6377
uses: actions/upload-artifact@v4
6478
with:
65-
name: ${{ matrix.artifact_name }}
79+
name: ${{ matrix.artifact_name }}-${{ env.VERSION }}
6680
path: dist/pyocd/*
6781
retention-days: 7
6882

6983
- name: Upload distribution artifacts
7084
uses: actions/upload-artifact@v4
7185
if: matrix.os == 'ubuntu-latest'
7286
with:
73-
name: pyocd-distribution
87+
name: pyocd-distribution-${{ env.VERSION }}
7488
path: |
7589
dist/*.whl
7690
dist/*.tar.gz

0 commit comments

Comments
 (0)