File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change @@ -24,15 +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 }}
43+ fail-on-cache-miss : true
44+
45+ - name : List output
46+ run : |
47+ ls -lah dist/*
3648
3749 - name : Publish to PyPI
3850 uses : pypa/gh-action-pypi-publish@release/v1
You can’t perform that action at this time.
0 commit comments