|
1 | | -# name: Publish to PyPi |
2 | | - |
3 | | -# # on: |
4 | | -# # release: |
5 | | -# # types: [created] |
| 1 | +name: Publish to PyPi |
6 | 2 |
|
7 | 3 | # on: |
8 | | -# push: |
9 | | -# branches: ['dev'] |
10 | | - |
11 | | -# jobs: |
12 | | -# check-docs-update: |
13 | | -# runs-on: ubuntu-latest |
14 | | -# env: |
15 | | -# OS: ubuntu-latest |
16 | | -# PYTHON: '3.7' |
17 | | -# steps: |
18 | | -# - uses: actions/checkout@v2 |
19 | | -# - uses: technote-space/get-diff-action@v6 |
20 | | -# with: |
21 | | -# # PATTERNS: | |
22 | | -# # +(documentation)/*.md |
23 | | -# # *.md |
24 | | -# FILES: | |
25 | | -# CHANGELOG.md |
26 | | -# README.md |
27 | | -# +(documentation)/*.md |
28 | | -# - name: log git diff |
29 | | -# run: | |
30 | | -# echo ${{ env.GIT_DIFF }} |
31 | | -# echo ${{ env.MATCHED_FILES }} |
32 | | -# echo ${{ env.GIT_DIFF_FILTERED }} |
33 | | -# - name: Check if README.md or Doc/** is updated else exit |
34 | | -# if: (env.GIT_DIFF == '') |
35 | | -# run: | |
36 | | -# echo Update documentation files or README.md before push |
37 | | -# exit 1 |
| 4 | +# release: |
| 5 | +# types: [created] |
| 6 | + |
| 7 | +on: |
| 8 | + push: |
| 9 | + branches: ['dev'] |
| 10 | + |
| 11 | +jobs: |
| 12 | + check-docs-update: |
| 13 | + runs-on: ubuntu-latest |
| 14 | + env: |
| 15 | + OS: ubuntu-latest |
| 16 | + PYTHON: '3.7' |
| 17 | + steps: |
| 18 | + - uses: actions/checkout@v2 |
| 19 | + - uses: technote-space/get-diff-action@v6 |
| 20 | + with: |
| 21 | + # PATTERNS: | |
| 22 | + # +(documentation)/*.md |
| 23 | + # *.md |
| 24 | + FILES: | |
| 25 | + CHANGELOG.md |
| 26 | + README.md |
| 27 | + +(documentation)/*.md |
| 28 | +
|
| 29 | + - name: log git diff |
| 30 | + run: | |
| 31 | + echo ${{ env.GIT_DIFF }} |
| 32 | + echo ${{ env.MATCHED_FILES }} |
| 33 | + echo ${{ env.GIT_DIFF_FILTERED }} |
| 34 | +
|
| 35 | + - name: Check if README.md or Doc/** is updated else exit |
| 36 | + if: (env.GIT_DIFF == '') |
| 37 | + run: | |
| 38 | + echo Update documentation files or README.md before push |
| 39 | + exit 1 |
| 40 | +
|
| 41 | + - name: push build status to Slack |
| 42 | + uses: 8398a7/action-slack@v3 |
| 43 | + with: |
| 44 | + status: ${{ job.status }} |
| 45 | + fields: repo,message,commit,author,action,eventName,ref,workflow,job,took,pullRequest |
| 46 | + env: |
| 47 | + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |
| 48 | + if: always() |
38 | 49 |
|
39 | 50 |
|
40 | 51 | # distribute: |
|
48 | 59 | # uses: actions/setup-python@v2 |
49 | 60 | # with: |
50 | 61 | # python-version: '3.7' |
| 62 | + |
51 | 63 | # - name: Install dependencies |
52 | 64 | # run: | |
53 | 65 | # python -m pip install --upgrade pip |
54 | 66 | # pip install setuptools wheel twine |
| 67 | + |
55 | 68 | # - name: Build and publish |
56 | 69 | # env: |
57 | 70 | # TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} |
58 | 71 | # TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} |
59 | 72 | # run: | |
60 | 73 | # python setup.py sdist bdist_wheel |
61 | 74 | # twine upload dist/* |
| 75 | + |
| 76 | + # - name: push build status to Slack |
| 77 | + # uses: 8398a7/action-slack@v3 |
| 78 | + # with: |
| 79 | + # status: ${{ job.status }} |
| 80 | + # fields: repo,message,commit,author,action,eventName,ref,workflow,job,took,pullRequest |
| 81 | + # env: |
| 82 | + # SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |
| 83 | + # if: always() |
0 commit comments