Skip to content

Commit

Permalink
updated publish script
Browse files Browse the repository at this point in the history
  • Loading branch information
dougransom committed Oct 8, 2023
1 parent 078a62d commit d12bb27
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:

permissions:
contents: read

id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
jobs:
build_and_publish:
# Set up the environment `CI` references the secret `PYPI_API_TOKEN` in repository settings
Expand All @@ -16,14 +16,10 @@ jobs:
- uses: actions/checkout@v2
- name: Installing build Dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flit
- name: Building package with flit
run: |
flit build
- name: Publishing 📦 to Test PyPI
# Regarding building artifacts within Platform specific environment see https://github.com/pypa/gh-action-pypi-publish#non-goals
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
repository-url: https://upload.pypi.org/legacy/

0 comments on commit d12bb27

Please sign in to comment.