Skip to content

Commit 1b8f6cc

Browse files
committed
Update release.yml
1 parent 44415b4 commit 1b8f6cc

File tree

1 file changed

+13
-59
lines changed

1 file changed

+13
-59
lines changed

.github/workflows/release.yml

Lines changed: 13 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -6,84 +6,38 @@ on:
66
workflow_dispatch: { }
77

88
jobs:
9-
find_version:
10-
name: Find Version
9+
publish:
10+
needs: release
11+
name: Deploy Release to PyPI
1112
runs-on: ubuntu-latest
12-
outputs:
13-
version: ${{ steps.get-version.outputs.version }}
1413
steps:
1514
- name: Checkout source
1615
uses: actions/checkout@v2.3.2
1716
- name: Set up Python
1817
uses: actions/setup-python@v2
1918
with:
2019
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 }}
2429
- name: Install tox
2530
run: pip install tox
2631
- name: Generate API docs
2732
run: |
2833
rm -rf ./docs/_build
2934
tox -e docs
3035
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
6337
uses: actions/upload-artifact@v3
6438
with:
6539
name: apidocs
6640
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 }}
8741
# Test upload
8842
# - name: Publish package to TestPyPI
8943
# uses: pypa/gh-action-pypi-publish@master

0 commit comments

Comments
 (0)