File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33on :
44 push :
55
6+ env :
7+ BASE_VERSION : ' 6.0.0'
8+
69jobs :
710 checks :
811 runs-on : ubuntu-latest
@@ -43,21 +46,35 @@ jobs:
4346
4447 publish :
4548 needs : tests
46- if : startsWith( github.ref, 'refs/tags/v')
49+ if : github.ref == 'refs/heads/main'
4750 runs-on : ubuntu-latest
4851 permissions :
4952 contents : read
5053
5154 steps :
5255 - uses : actions/checkout@v4
56+
57+ - name : Establish Versioning, Tags, and Labels
58+ id : vtl
59+ uses : mapped/action-vtl@latest
60+ with :
61+ baseVersion : ${{ env.BASE_VERSION }}
62+ gitHubToken : ${{ secrets.GITHUB_TOKEN }}
63+
5364 - name : Set up Python
5465 uses : actions/setup-python@v5
5566 with :
5667 python-version : ' 3.11'
68+
69+ - name : Update package version
70+ run : |
71+ sed -i "s/__version__ = '.*'/__version__ = '${{ steps.vtl.outputs.ver_semVerNoMeta }}'/" diskcache/__init__.py
72+
5773 - name : Build package
5874 run : |
5975 pip install build
6076 python -m build
77+
6178 - name : Publish to PyPI
6279 uses : pypa/gh-action-pypi-publish@release/v1
6380 with :
You can’t perform that action at this time.
0 commit comments