|
1 | 1 | name: Publish to PyPi |
2 | 2 |
|
3 | | -# on: |
4 | | -# release: |
5 | | -# types: [created] |
6 | | - |
7 | 3 | on: |
8 | | - push: |
9 | | - branches: ['dev'] |
| 4 | + release: |
| 5 | + types: [created] |
10 | 6 |
|
11 | 7 | jobs: |
12 | 8 | check-docs-update: |
@@ -47,36 +43,36 @@ jobs: |
47 | 43 | if: always() |
48 | 44 |
|
49 | 45 |
|
50 | | - # distribute: |
51 | | - # runs-on: ubuntu-latest |
52 | | - # env: |
53 | | - # OS: ubuntu-latest |
54 | | - # PYTHON: '3.7' |
55 | | - # steps: |
56 | | - # - uses: actions/checkout@v2 |
57 | | - # - name: Set up Python |
58 | | - # uses: actions/setup-python@v2 |
59 | | - # with: |
60 | | - # python-version: '3.7' |
| 46 | + distribute: |
| 47 | + runs-on: ubuntu-latest |
| 48 | + env: |
| 49 | + OS: ubuntu-latest |
| 50 | + PYTHON: '3.7' |
| 51 | + steps: |
| 52 | + - uses: actions/checkout@v2 |
| 53 | + - name: Set up Python |
| 54 | + uses: actions/setup-python@v2 |
| 55 | + with: |
| 56 | + python-version: '3.7' |
61 | 57 |
|
62 | | - # - name: Install dependencies |
63 | | - # run: | |
64 | | - # python -m pip install --upgrade pip |
65 | | - # pip install setuptools wheel twine |
| 58 | + - name: Install dependencies |
| 59 | + run: | |
| 60 | + python -m pip install --upgrade pip |
| 61 | + pip install setuptools wheel twine |
66 | 62 |
|
67 | | - # - name: Build and publish |
68 | | - # env: |
69 | | - # TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} |
70 | | - # TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} |
71 | | - # run: | |
72 | | - # python setup.py sdist bdist_wheel |
73 | | - # twine upload dist/* |
| 63 | + - name: Build and publish |
| 64 | + env: |
| 65 | + TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} |
| 66 | + TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} |
| 67 | + run: | |
| 68 | + python setup.py sdist bdist_wheel |
| 69 | + twine upload dist/* |
74 | 70 |
|
75 | | - # - name: push build status to Slack |
76 | | - # uses: 8398a7/action-slack@v3 |
77 | | - # with: |
78 | | - # status: ${{ job.status }} |
79 | | - # fields: repo,message,commit,author,action,eventName,ref,workflow,job,took,pullRequest |
80 | | - # env: |
81 | | - # SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |
82 | | - # if: always() |
| 71 | + - name: push build status to Slack |
| 72 | + uses: 8398a7/action-slack@v3 |
| 73 | + with: |
| 74 | + status: ${{ job.status }} |
| 75 | + fields: repo,message,commit,author,action,eventName,ref,workflow,job,took,pullRequest |
| 76 | + env: |
| 77 | + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |
| 78 | + if: always() |
0 commit comments