Skip to content

Commit

Permalink
Try to switch to PyPi trusted publisher.
Browse files Browse the repository at this point in the history
  • Loading branch information
Holt59 committed Sep 20, 2023
1 parent a1f5ef3 commit eb0866c
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ jobs:
deploy:
runs-on: ubuntu-latest

permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing

steps:
- uses: actions/checkout@v4
- name: Replace string
Expand All @@ -27,14 +30,12 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
pip install setuptools wheel
- name: Build
run: |
cd stubs/setup
cp -r ../${{ steps.version.outputs.replaced }}/mobase-stubs/* mobase-stubs/
sed -i 's/__version__ = ".*"/__version__ = "${{ github.ref_name }}"/' mobase-stubs/__init__.pyi
python setup.py sdist bdist_wheel
twine upload dist/*
- name: Publish to PyPi
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit eb0866c

Please sign in to comment.