Skip to content

Commit

Permalink
ci/cd
Browse files Browse the repository at this point in the history
  • Loading branch information
neudinger committed Mar 21, 2021
1 parent 88326d6 commit 204db4e
Showing 1 changed file with 7 additions and 14 deletions.
21 changes: 7 additions & 14 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ on:
push:
tags:
- "*"
# https://github.com/actions/upload-release-asset

jobs:
create_release:
if: contains(github.ref, 'v')
Expand All @@ -32,8 +30,7 @@ jobs:
strategy:
fail-fast: true
matrix:
# ubuntu-20.04, macOS-10.15,
os: [ windows-2019]
os: [ubuntu-20.04, macOS-10.15, windows-2019]
if: contains(github.ref, 'v')
steps:
- uses: actions/setup-python@v2
Expand All @@ -48,34 +45,30 @@ jobs:
version: ${{ github.ref }}
CIBW_ENVIRONMENT: "version=${{ github.ref }}"
run: |
python -m cibuildwheel --output-dir wheelhouse
python -m cibuildwheel --output-dir dist
- name: Upload Release Assets
id: upload-release-assets
uses: dwenegar/upload-release-assets@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_id: ${{ needs.create_release.outputs.id }}
assets_path: ./wheelhouse/
assets_path: ./dist/
# - name: Run Unit Test
# if: ${{ contains(github.ref, 't') }}
# - name: Generate Documentation
# if: ${{ contains(github.ref, 'd') && matrix.os == 'ubuntu-20.04' }}
# run: |
# pip install pdoc3
- name: Deploy to PyPI Posix
- name: Deploy to PyPI ${{ matrix.os }}
if: ${{ contains(github.ref, 'p') && matrix.os != 'windows-2019'}}
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python -m pip install twine
twine upload -u __token__ -p $TWINE_PASSWORD ./wheelhouse/*
- name: Deploy to PyPI Windows
twine upload -u __token__ -p $TWINE_PASSWORD dist/*
- name: Deploy to PyPI ${{ matrix.os }}
if: ${{ contains(github.ref, 'p') && matrix.os == 'windows-2019'}}
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python -m pip install twine
twine upload -u __token__ -p $TWINE_PASSWORD dist ./wheelhouse/*
twine upload -u __token__ -p ${{ secrets.PYPI_PASSWORD }} dist/*

0 comments on commit 204db4e

Please sign in to comment.