Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 14 additions & 63 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,71 +1,10 @@
name: Release
on:
push:
branches:
- master
workflow_dispatch: { }

jobs:
find_version:
name: Find Version
runs-on: ubuntu-latest
outputs:
version: ${{ steps.get-version.outputs.version }}
steps:
- name: Checkout source
uses: actions/[email protected]
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Get version
id: get-version
run: python -c 'import splunklib; print("::set-output name=version::%s" % splunklib.__version__)'
- name: Install tox
run: pip install tox
- name: Generate API docs
run: |
rm -rf ./docs/_build
tox -e docs
cd ./docs/_build/html && zip -r ../docs_html.zip . -x ".*" -x "__MACOSX"
tag_version:
needs: find_version
name: Tag Version
runs-on: ubuntu-latest
steps:
- name: Create tag
uses: tvdias/[email protected]
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ needs.find_version.outputs.version }}
release:
needs: [ find_version, tag_version ]
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/[email protected]
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ needs.find_version.outputs.version }}
release_name: Release/${{ needs.find_version.outputs.version }}
body: |
## Version ${{ needs.find_version.outputs.version }}
types: [published]

**TODO: Insert CHANGELOG.md contents here.**
draft: false
prerelease: false
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: apidocs
path: docs/_build/docs_html.zip
jobs:
publish:
needs: release
name: Deploy Release to PyPI
runs-on: ubuntu-latest
steps:
Expand All @@ -84,6 +23,18 @@ jobs:
with:
user: __token__
password: ${{ secrets.pypi_password }}
- name: Install tox
run: pip install tox
- name: Generate API docs
run: |
rm -rf ./docs/_build
tox -e docs
cd ./docs/_build/html && zip -r ../docs_html.zip . -x ".*" -x "__MACOSX"
- name : Docs Upload
uses: actions/upload-artifact@v3
with:
name: apidocs
path: docs/_build/docs_html.zip
# Test upload
# - name: Publish package to TestPyPI
# uses: pypa/gh-action-pypi-publish@master
Expand Down
3 changes: 1 addition & 2 deletions splunklib/binding.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,7 @@ def wrapper(self, *args, **kwargs):
with _handle_auth_error("Autologin failed."):
self.login()
with _handle_auth_error(
"Autologin succeeded, but there was an auth error on "
"next request. Something is very wrong."):
"Authentication Failed! If session token is used, it seems to have been expired."):
return request_fun(self, *args, **kwargs)
elif he.status == 401 and not self.autologin:
raise AuthenticationError(
Expand Down