Skip to content

Commit

Permalink
try token upload
Browse files Browse the repository at this point in the history
  • Loading branch information
samster25 committed Jan 8, 2025
1 parent d82460b commit c5d0685
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ jobs:
matrix:
os: [ubuntu, macos, windows]
compile_arch: [x86_64, aarch64]
lts: [0, 1] # LongTerm Support CPUs
# lts: [0, 1] # LongTerm Support CPUs
lts: [1] # LongTerm Support CPUs

exclude:
- os: windows
compile_arch: aarch64
Expand Down Expand Up @@ -153,10 +155,13 @@ jobs:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK


publish:
name: Publish wheels to PYPI and Anaconda
runs-on: ubuntu-latest
environment:
name: pypi
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
needs:
- build-and-test
steps:
Expand All @@ -165,19 +170,17 @@ jobs:
python-version: ${{ env.PYTHON_VERSION }}
architecture: x64
- run: pip install -U twine
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
pattern: wheels-*
merge-multiple: true
path: dist
- run: ls -R ./dist
- name: Publish bdist package to PYPI
if: ${{ success() && (env.IS_PUSH == 'true') }}
run: python -m twine upload --skip-existing --disable-progress-bar ./dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
- name: Publish package distributions to PyPI
# if: ${{ success() && (env.IS_PUSH == 'true') }}
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true

- uses: conda-incubator/setup-miniconda@v3
with:
Expand Down

0 comments on commit c5d0685

Please sign in to comment.