File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # .github/workflows/publish-cargo.yml
12name : Publish Cargo
23
34on :
45 workflow_call :
6+ inputs :
7+ cargo_token :
8+ required : true
9+ type : string
510 workflow_dispatch :
611
712permissions :
1621 - name : Install Rust
1722 uses : dtolnay/rust-toolchain@stable
1823
19- - run : cargo publish --token "${{ secrets.CARGO_REGISTRY_TOKEN }}"
24+ - name : Publish to crates.io
25+ run : cargo publish --token "${{ inputs.cargo_token }}"
Original file line number Diff line number Diff line change @@ -2,6 +2,10 @@ name: Publish PyPI
22
33on :
44 workflow_call :
5+ inputs :
6+ pypi_token :
7+ required : true
8+ type : string
59 workflow_dispatch :
610
711jobs :
2630 - name : Publish to PyPI
2731 uses : pypa/gh-action-pypi-publish@release/v1
2832 with :
29- password : ${{ secrets.PYPI_API_TOKEN }}
33+ password : ${{ inputs.pypi_token }}
Original file line number Diff line number Diff line change 1212 publish-pypi :
1313 uses : ./.github/workflows/publish-pypi.yml
1414 needs : build # ← Can run after build, even in parallel with cargo
15+ with :
16+ pypi_token : ${{ secrets.PYPI_API_TOKEN }}
1517
1618 publish-cargo :
17- uses : ./.github/workflows/publish-cargo.yml
19+ uses : ./.github/workflows/publish-cargo.yml
20+ with :
21+ cargo_token : ${{ secrets.CARGO_REGISTRY_TOKEN }}
You can’t perform that action at this time.
0 commit comments