@@ -209,8 +209,8 @@ jobs:
209209
210210 publish-on-testpypi :
211211 name : 📦 Publish on TestPyPI
212- # 🚨 CONDITION: Only run if the release is marked as a pre-release
213- if : github.event.release.prerelease == true
212+ # 🚨 CONDITION: all releases go to testpypi
213+ if : github.event_name == 'release'
214214 needs :
215215 - build
216216 - pre-commit
@@ -242,30 +242,31 @@ jobs:
242242 with :
243243 repository-url : https://test.pypi.org/legacy/
244244
245- # publish-on-pypi:
246- # name: 📦 Publish tagged releases to PyPI
247- # if: github.event_name == 'release'
248- # needs: publish-on-testpypi
249- # runs-on: ubuntu-latest
250-
251- # environment:
252- # name: pypi
253- # url: https://pypi.org/p/bambu-printer-manager
254-
255- # permissions:
256- # id-token: write
257-
258- # steps:
259- # - name: ⬇ Download build result
260- # uses: actions/download-artifact@v4
261- # with:
262- # name: dist
263- # path: dist
264-
265- # - name: 🧹 Remove some stuff that won't make it through twine check
266- # run: |
267- # rm dist/*.source.tar.gz
268- # rm dist/sha512sums.txt
269-
270- # - name: 📦 Publish to index
271- # uses: pypa/gh-action-pypi-publish@release/v1
245+ publish-on-pypi :
246+ name : 📦 Publish tagged releases to PyPI
247+ # 🚨 CONDITION: only production releases go to PyPI
248+ if : github.event_name == 'release' && github.event.release.prerelease == false
249+ needs : publish-on-testpypi
250+ runs-on : ubuntu-latest
251+
252+ environment :
253+ name : pypi
254+ url : https://pypi.org/p/bambu-printer-manager
255+
256+ permissions :
257+ id-token : write
258+
259+ steps :
260+ - name : ⬇ Download build result
261+ uses : actions/download-artifact@v4
262+ with :
263+ name : dist
264+ path : dist
265+
266+ - name : 🧹 Remove some stuff that won't make it through twine check
267+ run : |
268+ rm dist/*.source.tar.gz
269+ rm dist/sha512sums.txt
270+
271+ - name : 📦 Publish to index
272+ uses : pypa/gh-action-pypi-publish@release/v1
0 commit comments