Skip to content
This repository was archived by the owner on Aug 15, 2025. It is now read-only.

Commit 3b99ca8

Browse files
authored
Merge pull request #5 from PowerGridModel/add-trusted-publisher
Add trusted publisher
2 parents 47fd846 + 28b9075 commit 3b99ca8

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

.github/workflows/main.yml renamed to .github/workflows/ci.yml

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,16 @@ jobs:
1010
name: "Upload latest libboost-headers version to PyPI"
1111
runs-on: ubuntu-latest
1212
permissions:
13-
contents: read
14-
env:
15-
TWINE_USERNAME: ${{ secrets.PYPI_USER }}
16-
TWINE_PASSWORD: ${{ secrets.PYPI_PASS }}
13+
contents: write
14+
id-token: write # Required for Trusted Publishing
1715

1816
steps:
1917
- uses: actions/checkout@v4
2018

2119
- name: Setup python
2220
uses: actions/setup-python@v5
2321
with:
24-
python-version: "3.11"
22+
python-version: "3.13"
2523
architecture: x64
2624

2725
- name: Install dependencies
@@ -69,9 +67,17 @@ jobs:
6967
- name: List assets
7068
run: ls ./wheelhouse/ -al
7169

72-
- name: Upload wheels
73-
if: github.event_name == 'workflow_dispatch'
74-
run: |
75-
pip install twine
76-
echo "Publish to PyPI..."
77-
twine upload --verbose wheelhouse/*
70+
- name: Upload assets to PyPI
71+
uses: pypa/gh-action-pypi-publish@release/v1
72+
with:
73+
# To test, use the TestPyPI:
74+
# repository-url: https://test.pypi.org/legacy/
75+
# You must also create an account and project on TestPyPI,
76+
# as well as set the trusted-publisher in the project settings:
77+
# https://docs.pypi.org/trusted-publishers/adding-a-publisher/
78+
# To publish to the official PyPI repository, just keep
79+
# repository-url commented out.
80+
packages-dir: wheelhouse
81+
skip-existing: true
82+
print-hash: true
83+
verbose: true

0 commit comments

Comments
 (0)