Skip to content

Commit

Permalink
Merge pull request #335 from jamshale/main
Browse files Browse the repository at this point in the history
Update python publish workflow
  • Loading branch information
swcurran authored Dec 16, 2024
2 parents c248516 + a05f3fe commit 9c97f9c
Showing 1 changed file with 19 additions and 10 deletions.
29 changes: 19 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,8 @@ jobs:
build-py:
name: Build and test Python wrapper
needs: [build-release]
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing

strategy:
matrix:
Expand All @@ -221,15 +223,27 @@ jobs:
- os: ubuntu-latest
architecture: linux-aarch64
plat-name: manylinux2014_aarch64
environment:
name: pypi
url: https://pypi.org/p/aries-askar
- os: ubuntu-latest
architecture: linux-x86_64
plat-name: manylinux2014_x86_64
environment:
name: pypi
url: https://pypi.org/p/aries-askar
- os: macos-latest
architecture: darwin-universal
plat-name: macosx_10_9_universal2 # macosx_10_9_x86_64
environment:
name: pypi
url: https://pypi.org/p/aries-askar
- os: windows-latest
architecture: windows-x86_64
plat-name: win_amd64
environment:
name: pypi
url: https://pypi.org/p/aries-askar

runs-on: ${{ matrix.os }}

Expand Down Expand Up @@ -294,16 +308,11 @@ jobs:
auditwheel show wrappers/python/dist/* | tee auditwheel.log
grep -q manylinux_2_17_ auditwheel.log
- if: |
github.event_name == 'release' ||
(github.event_name == 'workflow_dispatch' && github.event.inputs.publish-python-wrapper == 'true')
name: Publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
twine upload --skip-existing dist/*
working-directory: wrappers/python
- name: Publish
if: github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && github.event.inputs.publish-python-wrapper == 'true')
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: wrappers/python/dist

build-ios:
name: Build library (iOS)
Expand Down

0 comments on commit 9c97f9c

Please sign in to comment.