Skip to content

Commit 11d2748

Browse files
committed
specify version explicitly
1 parent 1c61915 commit 11d2748

2 files changed

Lines changed: 14 additions & 2 deletions

File tree

.github/workflows/_build-package.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ jobs:
4040
if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
4141
TAG=${GITHUB_REF#refs/*/}
4242
sed -i -e "s/0.0.0/${TAG#v}/" pyproject.toml
43+
echo "Version detected as ${TAG#v}"
4344
fi
4445
4546
- name: Build package

.github/workflows/build.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,27 @@ jobs:
2424
publish:
2525
name: Publish to PyPI
2626
runs-on: ubuntu-latest
27+
needs: [build]
2728
steps:
29+
- name: Prepare tag
30+
run: |
31+
TAG=${GITHUB_REF#refs/*/}
32+
echo "PROLIF_VERSION=${TAG#v}" >> $GITHUB_ENV
33+
echo "Prepared version ${TAG#v} for publishing"
34+
2835
- name: Retrieve cached package
2936
uses: actions/cache/restore@v3
3037
id: cache-prolif
3138
with:
3239
path: |
33-
dist/prolif-*.whl
34-
dist/prolif-*.tar.gz
40+
dist/prolif-${PROLIF_VERSION}.whl
41+
dist/prolif-${PROLIF_VERSION}.tar.gz
3542
key: prolif-${{ runner.os }}-${{ github.sha }}
3643

44+
- name: List output
45+
run: |
46+
ls -lah dist/*
47+
3748
- name: Publish to PyPI
3849
uses: pypa/gh-action-pypi-publish@release/v1
3950
with:

0 commit comments

Comments
 (0)