Skip to content
Snippets Groups Projects
Select Git revision
  • d5bc26f61d174fae46c60cc02a4ac2f77fbce7a1
  • master default protected
  • GCMC
  • v2.2.2
  • v2.2.1
  • v2.2.0
  • v2.1.0
  • v2.0.0
  • v1.18.0
  • v1.17.0
  • v1.16.0
  • v1.15.4
  • v1.15.3
  • v1.15.2
  • v1.15.1
  • v1.15.0
  • v1.14.2
  • v1.14.1
  • v1.14.0
  • v1.13.5
  • v1.13.4
  • v1.13.3
  • v1.13.2
23 results

python-publish.yml

Blame
  • user avatar
    tqtg authored
    d5bc26f6
    History
    python-publish.yml 2.27 KiB
    # This workflow will upload a Python Package using Twine when a release is created
    # For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
    
    # This workflow uses actions that are not certified by GitHub.
    # They are provided by a third-party and are governed by
    # separate terms of service, privacy policy, and support
    # documentation.
    
    name: upload
    
    on:
      release:
        types: [published]
      push:
        branches: [ master ]
    
    jobs:
      build-wheels:
        name: Building on ${{ matrix.os }}
        runs-on: ${{ matrix.os }}
        strategy:
          matrix:
            os: [ubuntu-latest, macos-latest, windows-latest]
            python-version: [3.6, 3.7, 3.8]
            
        steps:
        - uses: actions/checkout@v2
    
        - name: Set up Python
          uses: actions/setup-python@v2
          with:
            python-version: ${{ matrix.python-version }}
        
        - name: Display Python version
          run: python -c "import sys; print(sys.version)"
        
        - name: Install dependencies
          run: |
            python -m pip install --upgrade pip
            python -m pip install --only-binary=numpy,scipy numpy scipy wheel
        
        - name: Build wheels
          run: python setup.py bdist_wheel
        
        - name: Publish wheels to GitHub artifacts
          uses: actions/upload-artifact@v2
          with:
            name: wheels
            path: ./dist/*.whl
    
    
      publish-pypi:
        needs: [build-wheels]
        runs-on: ubuntu-latest
        steps:
        - uses: actions/checkout@v2
        
        - uses: actions/download-artifact@v2
          with:
            name: wheels
            path: dist/
          
        - name: Set up Python
          uses: actions/setup-python@v2
          with:
            python-version: 3.8
    
        - name: Display Python version
          run: python -c "import sys; print(sys.version)"