Skip to content

Commit

Permalink
Merge pull request #26 from jamshale/pypi-publish
Browse files Browse the repository at this point in the history
WIP
  • Loading branch information
jamshale authored Dec 16, 2024
2 parents 0fd45a3 + 6a19057 commit b682f76
Showing 1 changed file with 26 additions and 17 deletions.
43 changes: 26 additions & 17 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,11 +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: pypa/gh-action-pypi-publish@release/v1
uses: actions/upload-artifact@v4
with:
packages-dir: wrappers/python/dist
name: python_package-${{ matrix.os }}
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
- name: Run tests
shell: sh
run: |
ls -R wrappers/python/dist
build-ios:
name: Build library (iOS)
Expand Down

0 comments on commit b682f76

Please sign in to comment.