Skip to content

Commit

Permalink
Build both for conda and pip.
Browse files Browse the repository at this point in the history
The complete release wokrflow.
  • Loading branch information
szlaura committed Nov 20, 2024
1 parent d9761cc commit 7b32fb9
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,38 @@ on:
types: [published]

jobs:
pypi-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Extract version from tag and update files
run: |
set -e
sed -i "s:9999:${VERSION//*v/}:" setup.py conda/meta.yaml
echo "Version set successfully in setup.py and conda/meta.yaml"
env:
VERSION: ${{ github.ref }}

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'

- name: Install PyPI dependencies
run: |
set -e
python -m pip install --upgrade pip setuptools wheel twine
- name: Build and publish to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
set -e
python setup.py sdist bdist_wheel
twine upload dist/*
conda-publish:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 7b32fb9

Please sign in to comment.