Skip to content

Commit

Permalink
Merge pull request #190 from linusjoonho/publish
Browse files Browse the repository at this point in the history
Publish
  • Loading branch information
linusjoonho authored Jan 7, 2023
2 parents ec01cdf + d5b45e2 commit ee81b90
Showing 1 changed file with 65 additions and 0 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Publish ipie
on:
release:
types:
- publised
workflow_dispatch:

jobs:
release-ubuntu:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v3
- name: Setup Python # Set Python version
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install numpy cython wheel
- name: Build wheels
run: |
python3 setup.py bdist_wheel
- name: List available wheels
run: |
ls ${{ github.workspace }}/dist
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
packages_dir: ${{ github.workspace }}/dist
verbose: true

release-macos:
runs-on: macos-latest
strategy:
matrix:
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install numpy cython wheel
- name: Build wheels
run: |
python setup.py bdist_wheel -v --dist-dir ${{ github.workspace }}/mac-dist
- name: List available wheels
run: |
ls ${{ github.workspace }}/mac-dist
- name: Publish to PyPI
# pypi-publish has issues with macos
run: |
pip install twine
export TWINE_USERNAME=__token__
export TWINE_PASSWORD="${{ secrets.PYPI_API_TOKEN }}"
twine upload --verbose ${{ github.workspace }}/mac-dist/*

0 comments on commit ee81b90

Please sign in to comment.