File: release.yml

package info (click to toggle)
prospector 1.10.3-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,440 kB
  • sloc: python: 4,200; makefile: 181
file content (37 lines) | stat: -rw-r--r-- 1,008 bytes parent folder | download
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
31
32
33
34
35
36
37
name: Release

on:
  release:
    types:
      - published

env:
  DEFAULT_PYTHON: 3.9

jobs:
  release-pypi:
    name: Upload release to PyPI
    runs-on: ubuntu-latest
    steps:
      - name: Check out code from Github
        uses: actions/checkout@v2.3.4
      - name: Set up Python ${{ env.DEFAULT_PYTHON }}
        id: python
        uses: actions/setup-python@v2.2.2
        with:
          python-version: ${{ env.DEFAULT_PYTHON }}
      - name: Install requirements
        run: |
          python -m pip install --disable-pip-version-check -U pip twine poetry "poetry-core<1.3.0"
      - name: Build distributions
        run: |
          poetry build -f wheel
          poetry build -f sdist
      - name: Upload to PyPI
        if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags')
        env:
          TWINE_REPOSITORY: pypi
          TWINE_USERNAME: __token__
          TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
        run: |
          twine upload --verbose dist/*