Skip to content

Commit

Permalink
Make: Patch Python version for builds
Browse files Browse the repository at this point in the history
  • Loading branch information
ashvardanian committed Dec 28, 2023
1 parent d6d03b2 commit 9e8ccf8
Showing 1 changed file with 39 additions and 42 deletions.
81 changes: 39 additions & 42 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,15 @@ permissions:
id-token: write

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

- uses: actions/checkout@v3
with:
persist-credentials: false
- uses: actions/setup-node@v3
- run: cp .github/workflows/package.json . && npm install && npx semantic-release

rebase:
name: Rebase Dev. Branch
Expand All @@ -49,7 +47,7 @@ jobs:
git fetch origin main
git checkout main-dev
git rebase origin/main
- name: Push changes
uses: CasperWA/push-protected@v2
with:
Expand All @@ -58,48 +56,47 @@ jobs:
unprotect_reviews: True
force: True


pypi_publish:
name: Publish Python
runs-on: ubuntu-latest
needs: versioning

steps:
- uses: actions/checkout@v3
with:
ref: 'main'
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
# Install dependencies:
# - build: for PyPi
# - anaconda-client: for Anaconda
# - urllib3: for Anaconda, as it is a dependency of anaconda-client
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build anaconda-client 'urllib3<2.0.0'
- name: Build package
run: python -m build

- name: Publish to PyPi
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

- name: Publish to Anaconda
env:
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }}
run: |
anaconda upload -u unum-cloud ./dist/*.tar.bz2
- uses: actions/checkout@v3
with:
ref: "main"
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.11"

# Install dependencies:
# - build: for PyPi
# - anaconda-client: for Anaconda
# - urllib3: for Anaconda, as it is a dependency of anaconda-client
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build anaconda-client 'urllib3<2.0.0'
- name: Build package
run: python -m build

- name: Publish to PyPi
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

- name: Publish to Anaconda
env:
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }}
run: |
anaconda upload -u unum-cloud ./dist/*.tar.bz2
deploy_docs:
name: Deploy Docs
environment:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-22.04
Expand All @@ -108,7 +105,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
with:
ref: 'main'
ref: "main"
- name: Setup GitHub Pages
uses: actions/configure-pages@v2
- name: Install dependencies
Expand Down

0 comments on commit 9e8ccf8

Please sign in to comment.