File: release.yml

package info (click to toggle)
python-iometer 0.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 156 kB
  • sloc: python: 599; makefile: 3
file content (26 lines) | stat: -rw-r--r-- 803 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
name: Publish to PyPI
on:
  workflow_dispatch:

jobs:
  test_pypi_release:
    runs-on: ubuntu-latest
    steps:
      - name: Check out code from GitHub
        uses: actions/checkout@v2
      - name : Setup Python
        uses: actions/setup-python@v2
      - name: Install Poetry
        run: pipx install Poetry
      - name: Install dependencies
        run: poetry install --no-interaction
      - name: Run pytest
        run: poetry run pytest tests/test.py
      - name: Build package
        run: poetry build --no-interaction
      - name: Set test PyPi repository
        run: poetry config repositories.pypi https://test.pypi.org/legacy/
      - name: Add token
        run: poetry config pypi-token.pypi ${{ secrets.PYPI_API_KEY }}
      - name: Publish package
        run: poetry publish