|
6 | 6 | workflow_dispatch: { }
|
7 | 7 |
|
8 | 8 | jobs:
|
9 |
| - find_version: |
10 |
| - name: Find Version |
| 9 | + publish: |
| 10 | + needs: release |
| 11 | + name: Deploy Release to PyPI |
11 | 12 | runs-on: ubuntu-latest
|
12 |
| - outputs: |
13 |
| - version: ${{ steps.get-version.outputs.version }} |
14 | 13 | steps:
|
15 | 14 | - name: Checkout source
|
16 | 15 | uses: actions/checkout@v2.3.2
|
17 | 16 | - name: Set up Python
|
18 | 17 | uses: actions/setup-python@v2
|
19 | 18 | with:
|
20 | 19 | python-version: 3.7
|
21 |
| - - name: Get version |
22 |
| - id: get-version |
23 |
| - run: python -c 'import splunklib; print("::set-output name=version::%s" % splunklib.__version__)' |
| 20 | + - name: Install dependencies |
| 21 | + run: pip install twine |
| 22 | + - name: Build package |
| 23 | + run: python setup.py sdist |
| 24 | +# - name: Publish package to PyPI |
| 25 | +# uses: pypa/gh-action-pypi-publish@v1.3.1 |
| 26 | +# with: |
| 27 | +# user: __token__ |
| 28 | +# password: ${{ secrets.pypi_password }} |
24 | 29 | - name: Install tox
|
25 | 30 | run: pip install tox
|
26 | 31 | - name: Generate API docs
|
27 | 32 | run: |
|
28 | 33 | rm -rf ./docs/_build
|
29 | 34 | tox -e docs
|
30 | 35 | cd ./docs/_build/html && zip -r ../docs_html.zip . -x ".*" -x "__MACOSX"
|
31 |
| - tag_version: |
32 |
| - needs: find_version |
33 |
| - name: Tag Version |
34 |
| - runs-on: ubuntu-latest |
35 |
| - steps: |
36 |
| - - name: Create tag |
37 |
| - uses: tvdias/github-tagger@v0.0.2 |
38 |
| - with: |
39 |
| - repo-token: ${{ secrets.GITHUB_TOKEN }} |
40 |
| - tag: ${{ needs.find_version.outputs.version }} |
41 |
| - release: |
42 |
| - needs: [ find_version, tag_version ] |
43 |
| - name: Create Release |
44 |
| - runs-on: ubuntu-latest |
45 |
| - steps: |
46 |
| - - name: Checkout code |
47 |
| - uses: actions/checkout@v2.3.2 |
48 |
| - - name: Create Release |
49 |
| - id: create_release |
50 |
| - uses: actions/create-release@v1 |
51 |
| - env: |
52 |
| - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
53 |
| - with: |
54 |
| - tag_name: ${{ needs.find_version.outputs.version }} |
55 |
| - release_name: Release/${{ needs.find_version.outputs.version }} |
56 |
| - body: | |
57 |
| - ## Version ${{ needs.find_version.outputs.version }} |
58 |
| -
|
59 |
| - **TODO: Insert CHANGELOG.md contents here.** |
60 |
| - draft: false |
61 |
| - prerelease: false |
62 |
| - - name: Upload Artifact |
| 36 | + - name : Docs Upload |
63 | 37 | uses: actions/upload-artifact@v3
|
64 | 38 | with:
|
65 | 39 | name: apidocs
|
66 | 40 | path: docs/_build/docs_html.zip
|
67 |
| - publish: |
68 |
| - needs: release |
69 |
| - name: Deploy Release to PyPI |
70 |
| - runs-on: ubuntu-latest |
71 |
| - steps: |
72 |
| - - name: Checkout source |
73 |
| - uses: actions/checkout@v2.3.2 |
74 |
| - - name: Set up Python |
75 |
| - uses: actions/setup-python@v2 |
76 |
| - with: |
77 |
| - python-version: 3.7 |
78 |
| - - name: Install dependencies |
79 |
| - run: pip install twine |
80 |
| - - name: Build package |
81 |
| - run: python setup.py sdist |
82 |
| - - name: Publish package to PyPI |
83 |
| - uses: pypa/gh-action-pypi-publish@v1.3.1 |
84 |
| - with: |
85 |
| - user: __token__ |
86 |
| - password: ${{ secrets.pypi_password }} |
87 | 41 | # Test upload
|
88 | 42 | # - name: Publish package to TestPyPI
|
89 | 43 | # uses: pypa/gh-action-pypi-publish@master
|
|
0 commit comments