File tree Expand file tree Collapse file tree 3 files changed +59
-1
lines changed Expand file tree Collapse file tree 3 files changed +59
-1
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ name: Test against a RabbitMQ broker
33on :
44 push :
55 branches :
6- - master
6+ - main
77 pull_request :
88 types :
99 - opened
Original file line number Diff line number Diff line change 1+ name : publish-pypi
2+
3+ on :
4+ workflow_call :
5+ inputs :
6+ pypi_repository_url :
7+ required : true
8+ type : string
9+ secrets :
10+ pypi_api_login :
11+ required : true
12+ pypi_api_password :
13+ required : true
14+
15+ jobs :
16+ pypi-publish :
17+ name : upload release to PyPI
18+ runs-on : ubuntu-latest
19+ # Specifying a GitHub environment is optional, but strongly encouraged
20+ environment :
21+ name : pypi
22+ url : https://pypi.org/p/rabbitmq-amqp-python-client
23+ permissions :
24+ # IMPORTANT: this permission is mandatory for trusted publishing
25+ id-token : write
26+ steps :
27+ - uses : actions/checkout@v3
28+ - name : build with poetry
29+ env :
30+ REPO : ${{ inputs.pypi_repository_url }}
31+ run : |
32+ curl -sSL https://install.python-poetry.org | python3 -
33+ export PATH="/home/runner/.local/bin:$PATH"
34+ poetry config repositories.test-pypi $REPO
35+ poetry build
36+ # retrieve your distributions here
37+ - name : Publish package distributions to PyPI
38+ uses : pypa/gh-action-pypi-publish@release/v1
39+ with :
40+ verbose : true
41+ attestations : false
Original file line number Diff line number Diff line change 1+ name : publish-release
2+
3+ on :
4+ release :
5+ types :
6+ - released
7+
8+ jobs :
9+ call-publish-pypi :
10+ permissions :
11+ id-token : write
12+ uses : ./.github/workflows/publish-pypi.yaml
13+ with :
14+ pypi_repository_url : https://upload.pypi.org/legacy/
15+ secrets :
16+ pypi_api_login : __token__
17+ pypi_api_password : ${{ secrets.PYPI_TOKEN }}
You can’t perform that action at this time.
0 commit comments