Skip to content

Commit

Permalink
Make publish-to-testpypi manual
Browse files Browse the repository at this point in the history
  • Loading branch information
milouk committed Nov 28, 2024
1 parent 9e363df commit d3b210f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: Publish Python 🐍 distribution 📦 to PyPI and TestPyPI

on: push
on:
push:
workflow_dispatch:

jobs:
build:
Expand Down Expand Up @@ -30,15 +32,15 @@ jobs:
publish-to-pypi:
name: >-
Publish Python 🐍 distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
if: startsWith(github.ref, 'refs/tags/')
needs:
- build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/inia
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
id-token: write

steps:
- name: Download all the dists
Expand Down Expand Up @@ -94,7 +96,7 @@ jobs:
needs:
- build
runs-on: ubuntu-latest

if: ${{ github.event_name == 'workflow_dispatch'}}
environment:
name: testpypi
url: https://test.pypi.org/p/inia
Expand Down

0 comments on commit d3b210f

Please sign in to comment.