Skip to content

Commit

Permalink
put publish workflows into matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
rogerwwww committed Jan 29, 2024
1 parent 385388f commit 707f2f2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 59 deletions.
60 changes: 2 additions & 58 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,70 +41,14 @@ jobs:

linux:
needs: deploy
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10"]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r pygmtools/publish_requirements.txt
- name: Build Wheel
run: |
python setup.py bdist_wheel
- name: Upload Wheel to PyPI
run: |
pip install twine
python -m twine upload dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN_PYGMTOOLS }}


macos:
needs: deploy
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10"]
os: [ ubuntu-20.04, windows-2022, macos-12, macos-13-arm64 ]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r pygmtools/publish_requirements.txt
- name: Build Wheel
run: |
python setup.py bdist_wheel
- name: Upload Wheel to PyPI
run: |
pip install twine
python -m twine upload dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN_PYGMTOOLS }}

windows:
needs: deploy
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10"]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion pygmtools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
set_backend = utils.set_backend

BACKEND = 'numpy'
__version__ = '0.4.3'
__version__ = '0.4.3a'
__author__ = 'ThinkLab at SJTU'

SUPPORTED_BACKENDS = [
Expand Down

0 comments on commit 707f2f2

Please sign in to comment.