Skip to content

Commit

Permalink
πŸ’š ci: use trusted publisher (#8)
Browse files Browse the repository at this point in the history
* πŸ’š ci: use trusted publisher

* πŸ’š ci: fix cov path
  • Loading branch information
ljnsn authored Mar 7, 2024
1 parent 20d0dde commit efe39a2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
- name: Archive code coverage results
uses: actions/upload-artifact@v3
with:
name: coverage-${{ matrix.package }}-${{ matrix.python-version }}
name: coverage-${{ matrix.platform }}-${{ matrix.python-version }}
path: reports/.coverage

upload-coverage:
Expand Down
26 changes: 11 additions & 15 deletions .github/workflows/pythonpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,16 @@ on:
- "v*"

jobs:
deploy:
pypi-publish:
name: upload release to PyPI
runs-on: ubuntu-latest
permissions:
# This permission is needed for private repositories.
contents: read
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pdm>=2.11.1
- name: Publish
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.POETRY_PYPI_TOKEN_PYPI }}
run: |
python -m pdm publish
- uses: actions/checkout@v3
- uses: pdm-project/setup-pdm@v3
- name: Publish package distributions to PyPI
run: pdm publish

0 comments on commit efe39a2

Please sign in to comment.