File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -5,10 +5,14 @@ name: Publish
55on : push # yamllint disable-line rule:truthy
66
77jobs :
8+ # set-unique-version:
9+ # name: Set unique version for non-tag builds
10+ # if: ${{ ! startsWith(github.ref, 'refs/tags/') }}
11+ # runs-on: ubuntu-latest
12+
813 build :
914 name : Build distribution package
1015 runs-on : ubuntu-latest
11-
1216 steps :
1317 - uses : actions/checkout@v4
1418 with :
1923 python-version : " 3.x"
2024 - name : Install pypa/build
2125 run : python -m pip install --user build
26+ - name : Set unique version for non-tag builds
27+ if : ${{ ! startsWith(github.ref, 'refs/tags/') }}
28+ run : # changes version to e.g. '1.36.2.dev-gcd96692'
29+ sed -i "/^APP_VERSION = /s/'$/.g$(git rev-parse --short HEAD)'/"
30+ yamllint/__init__.py
2231 - name : Build a binary wheel and a source tarball
2332 run : python -m build
2433 - name : Store the distribution packages
2938
3039 publish-to-testpypi :
3140 name : Publish distribution package to TestPyPI
41+ # if: github.ref == 'refs/heads/master'
3242 needs : build
3343 runs-on : ubuntu-latest
3444 environment :
4656 uses : pypa/gh-action-pypi-publish@release/v1
4757 with :
4858 repository-url : https://test.pypi.org/legacy/
49- skip-existing : true
5059
5160 publish-to-pypi :
5261 name : Publish distribution package to PyPI
You can’t perform that action at this time.
0 commit comments