@@ -14,48 +14,36 @@ jobs:
1414 runs-on : ubuntu-latest
1515 steps :
1616 - uses : actions/checkout@v4
17-
18- - name : Setup Python
19- uses : actions/setup-python@v5
17+ - uses : actions/setup-python@v5
2018 with :
2119 python-version : " 3.13"
22-
23- - name : Install build tools
24- run : pip install build twine
25-
26- - name : Build package
27- run : python -m build
28-
29- - name : Create GitHub Release
30- uses : softprops/action-gh-release@v2
20+ - run : pip install build twine
21+ - run : python -m build
22+ - uses : softprops/action-gh-release@v2
3123 with :
3224 generate_release_notes : true
3325 files : dist/*
3426 fail_on_unmatched_files : false
35-
36- - name : Publish to PyPI
27+ - run : twine upload dist/*
3728 env :
3829 TWINE_USERNAME : __token__
3930 TWINE_PASSWORD : ${{ secrets.PYPI_API_TOKEN }}
40- run : twine upload dist/*
4131
4232 docker :
4333 runs-on : ubuntu-latest
4434 steps :
4535 - uses : actions/checkout@v4
46-
36+ - id : lower
37+ run : echo "repo=${GITHUB_REPOSITORY,,}" >> $GITHUB_OUTPUT
4738 - name : Log in to ghcr.io
4839 uses : docker/login-action@v3
4940 with :
5041 registry : ghcr.io
5142 username : ${{ github.actor }}
5243 password : ${{ secrets.GITHUB_TOKEN }}
53-
54- - name : Build and push Docker image
44+ - name : Build and push
5545 uses : docker/build-push-action@v5
5646 with :
5747 context : .
5848 push : true
59- tags : |
60- ghcr.io/${{ github.repository }}:latest
61- ghcr.io/${{ github.repository }}:${{ github.ref_name }}
49+ tags : ghcr.io/${{ steps.lower.outputs.repo }}:latest,ghcr.io/${{ steps.lower.outputs.repo }}:${{ github.ref_name }}
0 commit comments