|
8 | 8 |
|
9 | 9 | #-------------------------------------------------- |
10 | 10 | name: Release & Publish |
11 | | - |
12 | | -on: |
13 | | - push: |
14 | | - # Sequence of patterns matched against refs/tags |
15 | | - tags: |
16 | | - - "v*" # Push events to matching v*, i.e. v1.0, v20.15.10 |
17 | | - |
18 | | -jobs: |
19 | | - build: |
20 | | - name: Create release & publish to PyPI |
21 | | - runs-on: ubuntu-latest |
22 | | - steps: |
23 | | - - name: Checkout repo |
24 | | - uses: actions/checkout@v2 |
25 | | - |
26 | | - - name: Set up python |
27 | | - uses: actions/setup-python@v2 |
28 | | - with: |
29 | | - python-version: "3.x" |
30 | | - |
31 | | - - name: Install Dependencies |
32 | | - run: | |
33 | | - python -m pip install --upgrade pip |
34 | | - pip install setuptools wheel twine jupyter urllib3 pandas pyyaml |
35 | | - python setup.py sdist bdist_wheel |
36 | | - |
37 | | - - name: run Changelog |
38 | | - run: | |
39 | | - jupyter nbconvert --to notebook --execute --inplace --ExecutePreprocessor.timeout=-1 --ExecutePreprocessor.kernel_name=python3 tools/gitcount.ipynb |
40 | | - |
41 | | - - name: cat Changelog |
42 | | - uses: pCYSl5EDgo/cat@master |
43 | | - id: changetxt |
44 | | - with: |
45 | | - path: ./tools/changelog.md |
46 | | - env: |
47 | | - TEXT: ${{ steps.changetxt.outputs.text }} |
48 | | - |
49 | | - - name: Get the tag name |
50 | | - run: echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV |
51 | | - |
52 | | - - name: Release |
53 | | - uses: softprops/action-gh-release@v1 |
54 | | - with: |
55 | | - body: ${{ steps.changetxt.outputs.text }} |
56 | | - body_path: ${{ steps.changetxt.outputs.path }} |
57 | | - name: Release ${{ env.TAG }} |
58 | | - env: |
59 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
60 | | - |
61 | | - - name: Publish distribution 📦 to PyPI |
62 | | - uses: pypa/gh-action-pypi-publish@master |
63 | | - with: |
64 | | - user: __token__ |
65 | | - password: ${{ secrets.PYPI_PASSWORD }} |
| 11 | + |
| 12 | + on: |
| 13 | + push: |
| 14 | + # Sequence of patterns matched against refs/tags |
| 15 | + tags: |
| 16 | + - "v*" # Push events to matching v*, i.e. v1.0, v20.15.10 |
| 17 | + |
| 18 | + jobs: |
| 19 | + build: |
| 20 | + name: Create release & publish to PyPI |
| 21 | + runs-on: ubuntu-latest |
| 22 | + steps: |
| 23 | + - name: Checkout repo |
| 24 | + uses: actions/checkout@v2 |
| 25 | + |
| 26 | + - name: Set up python |
| 27 | + uses: actions/setup-python@v2 |
| 28 | + with: |
| 29 | + python-version: "3.x" |
| 30 | + |
| 31 | + - name: Install Dependencies |
| 32 | + run: | |
| 33 | + python -m pip install --upgrade pip |
| 34 | + pip install setuptools wheel twine jupyter urllib3 pandas pyyaml |
| 35 | + python setup.py sdist bdist_wheel |
| 36 | + |
| 37 | + - name: run Changelog |
| 38 | + run: | |
| 39 | + jupyter nbconvert --to notebook --execute --inplace --ExecutePreprocessor.timeout=-1 --ExecutePreprocessor.kernel_name=python3 tools/gitcount.ipynb |
| 40 | + |
| 41 | + - name: cat Changelog |
| 42 | + uses: pCYSl5EDgo/cat@master |
| 43 | + id: changetxt |
| 44 | + with: |
| 45 | + path: ./tools/changelog.md |
| 46 | + env: |
| 47 | + TEXT: ${{ steps.changetxt.outputs.text }} |
| 48 | + |
| 49 | + - name: Get the tag name |
| 50 | + run: echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV |
| 51 | + |
| 52 | + - name: Release |
| 53 | + uses: softprops/action-gh-release@v1 |
| 54 | + with: |
| 55 | + body: ${{ steps.changetxt.outputs.text }} |
| 56 | + body_path: ${{ steps.changetxt.outputs.path }} |
| 57 | + name: Release ${{ env.TAG }} |
| 58 | + env: |
| 59 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 60 | + |
| 61 | + - name: Publish distribution 📦 to PyPI |
| 62 | + uses: pypa/gh-action-pypi-publish@master |
| 63 | + with: |
| 64 | + user: __token__ |
| 65 | + password: ${{ secrets.PYPI_PASSWORD }} |
0 commit comments