Skip to content

Commit e162cc0

Browse files
authored
Merge pull request #446 from splunk/release-workflow-refactor
Release workflow refactor
2 parents 44415b4 + af2898b commit e162cc0

File tree

2 files changed

+15
-65
lines changed

2 files changed

+15
-65
lines changed

.github/workflows/release.yml

Lines changed: 14 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,10 @@
11
name: Release
22
on:
3-
push:
4-
branches:
5-
- master
6-
workflow_dispatch: { }
7-
8-
jobs:
9-
find_version:
10-
name: Find Version
11-
runs-on: ubuntu-latest
12-
outputs:
13-
version: ${{ steps.get-version.outputs.version }}
14-
steps:
15-
- name: Checkout source
16-
uses: actions/[email protected]
17-
- name: Set up Python
18-
uses: actions/setup-python@v2
19-
with:
20-
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__)'
24-
- name: Install tox
25-
run: pip install tox
26-
- name: Generate API docs
27-
run: |
28-
rm -rf ./docs/_build
29-
tox -e docs
30-
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/[email protected]
38-
with:
39-
repo-token: ${{ secrets.GITHUB_TOKEN }}
40-
tag: ${{ needs.find_version.outputs.version }}
413
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/[email protected]
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 }}
4+
types: [published]
585

59-
**TODO: Insert CHANGELOG.md contents here.**
60-
draft: false
61-
prerelease: false
62-
- name: Upload Artifact
63-
uses: actions/upload-artifact@v3
64-
with:
65-
name: apidocs
66-
path: docs/_build/docs_html.zip
6+
jobs:
677
publish:
68-
needs: release
698
name: Deploy Release to PyPI
709
runs-on: ubuntu-latest
7110
steps:
@@ -84,6 +23,18 @@ jobs:
8423
with:
8524
user: __token__
8625
password: ${{ secrets.pypi_password }}
26+
- name: Install tox
27+
run: pip install tox
28+
- name: Generate API docs
29+
run: |
30+
rm -rf ./docs/_build
31+
tox -e docs
32+
cd ./docs/_build/html && zip -r ../docs_html.zip . -x ".*" -x "__MACOSX"
33+
- name : Docs Upload
34+
uses: actions/upload-artifact@v3
35+
with:
36+
name: apidocs
37+
path: docs/_build/docs_html.zip
8738
# Test upload
8839
# - name: Publish package to TestPyPI
8940
# uses: pypa/gh-action-pypi-publish@master

splunklib/binding.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,8 +295,7 @@ def wrapper(self, *args, **kwargs):
295295
with _handle_auth_error("Autologin failed."):
296296
self.login()
297297
with _handle_auth_error(
298-
"Autologin succeeded, but there was an auth error on "
299-
"next request. Something is very wrong."):
298+
"Authentication Failed! If session token is used, it seems to have been expired."):
300299
return request_fun(self, *args, **kwargs)
301300
elif he.status == 401 and not self.autologin:
302301
raise AuthenticationError(

0 commit comments

Comments
 (0)