File: publish.yml

package info (click to toggle)
python-pyomop 4.3.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 536 kB
  • sloc: python: 1,374; sh: 37; makefile: 26
file content (30 lines) | stat: -rw-r--r-- 921 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
name: Upload Python Package to PyPi
# https://docs.github.com/en/actions/guides/building-and-testing-python
# https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
on:
  release:
    types: [published]

jobs:
  deploy:
    runs-on: ubuntu-latest
    timeout-minutes: 20
    steps:
    - uses: actions/checkout@v4
    - name: Set up Python
      uses: actions/setup-python@v5.0.0
      with:
        python-version: '3.10.13'
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install -r dev-requirements.txt
    - name: Build and publish
      run: |
        python setup.py bdist_wheel
    - name: Publish distribution 📦 to PyPI
      if: startsWith(github.ref, 'refs/tags')
      uses: pypa/gh-action-pypi-publish@master
      with:
        user: __token__
        password: ${{ secrets.PYPI_API_TOKEN }}