File tree Expand file tree Collapse file tree 2 files changed +81
-64
lines changed Expand file tree Collapse file tree 2 files changed +81
-64
lines changed Original file line number Diff line number Diff line change @@ -25,29 +25,40 @@ jobs:
2525 with :
2626 fetch-depth : 0
2727 persist-credentials : false
28+ - name : Remove Hardcoded Version (if present)
29+ run : |
30+ sed -i '/^version =/d' pyproject.toml
31+ - name : Update Dependencies
32+ run : |
33+ uv pip install --upgrade setuptools wheel hatchling twine
2834 - name : Build app
2935 run : |
3036 uv sync --frozen
3137 uv build
3238 id : build_cache
3339 if : success()
40+ - name : Validate Metadata
41+ run : |
42+ uv run twine check dist/*
43+ - name : Debug Dist Directory
44+ run : |
45+ ls -al dist
3446 - name : Cache build
35- uses : actions/cache@v2
47+ uses : actions/cache@v3
3648 with :
3749 path : ./dist
38- key : ${{ runner.os }}-build-${{ hashFiles('dist/**') }}
50+ key : ${{ runner.os }}-build-${{ github.sha }}
3951 if : steps.build_cache.outputs.id != ''
4052
4153 release :
4254 name : Release
4355 runs-on : ubuntu-latest
4456 needs : build
4557 environment : development
46- if : |
47- github.event_name == 'push' && github.ref == 'refs/heads/main' ||
48- github.event_name == 'push' && github.ref == 'refs/heads/pre/beta' ||
49- github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged && github.event.pull_request.base.ref == 'main' ||
50- github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged && github.event.pull_request.base.ref == 'pre/beta'
58+ if : >
59+ github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/pre/beta') ||
60+ (github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged &&
61+ (github.event.pull_request.base.ref == 'main' || github.event.pull_request.base.ref == 'pre/beta'))
5162 permissions :
5263 contents : write
5364 issues : write
7384 conventional-changelog-conventionalcommits@7
7485 env :
7586 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
76- PYPI_TOKEN : ${{ secrets.PYPI_TOKEN }}
87+ PYPI_TOKEN : ${{ secrets.PYPI_TOKEN }}
You can’t perform that action at this time.
0 commit comments