|
1 | | -name: Release Python Package |
| 1 | +name: Publish to PyPI |
2 | 2 |
|
3 | 3 | on: |
4 | | - push: |
5 | | - # Sequence of patterns matched against refs/tags |
6 | | - tags: |
7 | | - - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 |
| 4 | + release: |
| 5 | + types: [created] |
8 | 6 |
|
9 | 7 | jobs: |
10 | | - release: |
11 | | - name: Create Release |
12 | | - runs-on: ubuntu-latest |
13 | | - steps: |
14 | | - - name: Checkout code |
15 | | - uses: actions/checkout@master |
16 | | - - name: Create Release |
17 | | - id: create_release |
18 | | - uses: actions/create-release@v1 |
19 | | - env: |
20 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token |
21 | | - with: |
22 | | - tag_name: ${{ github.ref }} |
23 | | - release_name: Release ${{ github.ref }} |
24 | | - body: | |
25 | | - Changes in this Release |
26 | | - draft: true |
27 | | - prerelease: true |
28 | 8 | deploy: |
29 | | - needs: release |
30 | 9 | runs-on: ubuntu-latest |
31 | 10 | steps: |
32 | | - - uses: actions/checkout@v1 |
| 11 | + - uses: actions/checkout@v2 |
| 12 | + |
33 | 13 | - name: Set up Python |
34 | | - uses: actions/setup-python@v1 |
| 14 | + uses: actions/setup-python@v2 |
35 | 15 | with: |
36 | 16 | python-version: '3.x' |
| 17 | + |
37 | 18 | - name: Install dependencies |
38 | 19 | run: | |
39 | 20 | python -m pip install --upgrade pip |
40 | 21 | pip install setuptools wheel |
| 22 | +
|
41 | 23 | - name: Build a binary wheel and a source tarball |
42 | 24 | run: | |
43 | 25 | python setup.py sdist bdist_wheel |
44 | 26 |
|
45 | 27 | - name: Publish to Test PyPI |
46 | | - if: contains(github.ref, "beta") || contains(github.ref, "rc") |
| 28 | + #if: contains(github.ref, "beta") || contains(github.ref, "rc") |
47 | 29 | uses: pypa/gh-action-pypi-publish@master |
48 | 30 | with: |
49 | 31 | password: ${{ secrets.TEST_PYPI_API_TOKEN }} |
|
0 commit comments