Skip to content

Commit

Permalink
Merge pull request #339 from jamshale/main
Browse files Browse the repository at this point in the history
  • Loading branch information
swcurran authored Dec 17, 2024
2 parents 0fd45a3 + 5be70b7 commit 6229fd9
Showing 1 changed file with 27 additions and 15 deletions.
42 changes: 27 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,6 @@ 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 @@ -223,27 +221,15 @@ 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 @@ -308,8 +294,34 @@ jobs:
auditwheel show wrappers/python/dist/* | tee auditwheel.log
grep -q manylinux_2_17_ auditwheel.log
- name: Publish
- name: Upload Built Python Package
if: github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && github.event.inputs.publish-python-wrapper == 'true')
uses: actions/upload-artifact@v4
with:
name: python_package-${{ matrix.plat-name }}
path: wrappers/python/dist

publish-py:
name: Publish Python package
needs: [build-py]
if: github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && github.event.inputs.publish-python-wrapper == 'true')
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing

runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/aries-askar

steps:
- name: Fetch Python package
uses: actions/download-artifact@v4
with:
path: wrappers/python/dist
pattern: "python_package-*"
merge-multiple: true
- run: ls -R wrappers/python/dist
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: wrappers/python/dist
Expand Down

0 comments on commit 6229fd9

Please sign in to comment.