File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change 11name : release
22on :
33 push :
4- tags : ['v*']
5- workflow_dispatch :
6- inputs :
7- tag :
8- description : ' Tag to publish (v*)'
9- required : false
4+ tags : ['v*'] # SOLO tags v*
5+ workflow_dispatch : # manual: no publica PyPI si no hay token
106permissions :
117 contents : write
128 packages : write
139
1410jobs :
1511 build-publish :
12+ if : startsWith(github.ref, 'refs/tags/v')
1613 runs-on : ubuntu-latest
1714 steps :
1815 - uses : actions/checkout@v4
1916 - uses : actions/setup-python@v5
2017 with : { python-version: '3.12' }
21- - name : Build
18+ - name : Build sdist/wheel
2219 run : |
2320 python -m pip install -U pip build
2421 python -m build
@@ -32,14 +29,19 @@ jobs:
3229 password : ${{ secrets.PYPI_API_TOKEN }}
3330
3431 publish-ghcr :
32+ if : startsWith(github.ref, 'refs/tags/v')
3533 needs : build-publish
3634 runs-on : ubuntu-latest
3735 permissions : { contents: read, packages: write }
36+ env :
37+ DOCKER_BUILDKIT : " 1"
3838 steps :
3939 - uses : actions/checkout@v4
4040 - name : Compute image name (lowercase)
4141 shell : bash
4242 run : echo "IMAGE=ghcr.io/${GITHUB_REPOSITORY@L}" >> "$GITHUB_ENV"
43+ - uses : docker/setup-qemu-action@v3
44+ - uses : docker/setup-buildx-action@v3
4345 - uses : docker/login-action@v3
4446 with :
4547 registry : ghcr.io
4850 - uses : docker/build-push-action@v6
4951 with :
5052 context : .
53+ file : ./Dockerfile
54+ platforms : linux/amd64
5155 push : true
56+ provenance : false
5257 tags : ${{ env.IMAGE }}:latest,${{ env.IMAGE }}:${{ github.ref_name }}
You can’t perform that action at this time.
0 commit comments