File size: 944 Bytes
2bd75b6
 
 
b0a02aa
2bd75b6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7b496b7
2bd75b6
 
 
 
 
6b46e9f
2bd75b6
 
 
 
 
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
name: Deploy PyPI
on:
  workflow_run:
    workflows: ["Linux"]
    types:
      - completed

jobs:
  pypi:
    runs-on: ubuntu-latest
    steps:
      - name: "Checkout"
        uses: actions/checkout@v3
      - name: "Set up Python"
        uses: actions/setup-python@v4
        with:
          python-version: 3.10.8
      - name: "Install building tools"
        run: pip install wheel
      - name: "Build package"
        run: python setup.py sdist bdist_wheel
      - name: "Publish distribution πŸ“¦ to Test PyPI"
        uses: pypa/gh-action-pypi-publish@release/v1
        with:
          password: ${{ secrets.TEST_PYPI_API_TOKEN }}
          repository_url: https://test.pypi.org/legacy/
          skip_existing: true
      - name: "Publish distribution πŸ“¦ to PyPI"
        if: startsWith(github.ref, 'refs/tags')
        uses: pypa/gh-action-pypi-publish@release/v1
        with:
          password: ${{ secrets.PYPI_API_TOKEN }}