Skip to content

Commit

Permalink
Build: Trusted publishing to PyPi
Browse files Browse the repository at this point in the history
  • Loading branch information
ashvardanian committed May 2, 2023
1 parent 019ab19 commit 7663cf3
Showing 1 changed file with 17 additions and 15 deletions.
32 changes: 17 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@ permissions:

jobs:

# versioning:
# name: Semantic Release
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# with:
# persist-credentials: false
# - uses: actions/setup-node@v3
# - run: cp .github/workflows/package.json . && npm install && npx semantic-release
versioning:
name: Semantic Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- uses: actions/setup-node@v3
- run: cp .github/workflows/package.json . && npm install && npx semantic-release


build_wheels:
name: Build Wheels for ${{ matrix.os }}
runs-on: ${{ matrix.os }}
# needs: versioning
needs: versioning
strategy:
matrix:
os: [ubuntu-20.04, macOS-11]
Expand All @@ -56,22 +56,24 @@ jobs:
path: ./wheelhouse/*.whl


publish_wheels:
name: Publish Wheels to PyPi
publish_python:
name: Publish Python
runs-on: ubuntu-20.04
needs: build_wheels
environment:
name: pypi
url: https://pypi.org/p/ucall

permissions:
id-token: write

steps:
- name: Download artifacts
uses: actions/download-artifact@v3.0.2
with:
path: ./dist/

- name: Publish to PyPi
uses: pypa/gh-action-pypi-publish@v1.6.4
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages_dir: ./dist/artifact
verbose: true
Expand All @@ -84,7 +86,7 @@ jobs:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-22.04
needs: publish_wheels
needs: publish_python
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down

0 comments on commit 7663cf3

Please sign in to comment.