File tree Expand file tree Collapse file tree 1 file changed +35
-1
lines changed
Expand file tree Collapse file tree 1 file changed +35
-1
lines changed Original file line number Diff line number Diff line change 11name : " CD: Build & Publish"
22
33# TODO: Notify
4- # TODO: Publish to PyPI
54
65on :
76 pull_request :
@@ -157,3 +156,38 @@ jobs:
157156 files : dist/*
158157 env :
159158 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
159+
160+ pypi-publish :
161+ name : Publish to PyPI
162+ runs-on : ubuntu-latest
163+ needs : [build]
164+ permissions :
165+ id-token : write
166+ steps :
167+ - name : " [INIT] Checkout"
168+ uses : actions/checkout@v5
169+ with :
170+ fetch-depth : 0
171+
172+ - name : " [DOWNLOAD] Artifacts"
173+ uses : actions/download-artifact@v4
174+ with :
175+ name : dist-artifacts
176+ path : dist/
177+
178+ - name : " [INIT] Install Nix"
179+ uses : cachix/install-nix-action@v31
180+ with :
181+ nix_path : nixpkgs=channel:nixos-unstable
182+ github_access_token : ${{ secrets.GITHUB_TOKEN }}
183+
184+ - name : " [INIT] Setup Cachix"
185+ uses : cachix/cachix-action@v15
186+ with :
187+ name : amperser
188+ authToken : ${{ secrets.CACHIX_AUTH_TOKEN }}
189+
190+ - name : " [PUBLISH] PyPI via uv"
191+ if : ${{ github.event_name == 'workflow_dispatch' }}
192+ run : |
193+ nix develop --command uv publish
You can’t perform that action at this time.
0 commit comments