Fixing pypi upload issue (trusted publisher) #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Upload to PyPI | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-and-upload: | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: sksat/[email protected] | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.12' # Specify the Python version | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
- name: Build wheel | |
run: rye build --wheel | |
- name: Publish to PyPI | |
uses: pypa/[email protected] | |
# - name: Publish to PyPI | |
# uses: pypa/[email protected] | |
# with: | |
# user: __token__ # Use the PyPI API token | |
# password: ${{ secrets.PYPI_API_TOKEN }} # Set PYPI_API_TOKEN in your repository's secrets |