diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d588537b..4d11da59 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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/checkout@v2.3.2 - - 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/github-tagger@v0.0.2 - 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/checkout@v2.3.2 - - 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: @@ -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 diff --git a/splunklib/binding.py b/splunklib/binding.py index 6bf4f071..238ab0fd 100644 --- a/splunklib/binding.py +++ b/splunklib/binding.py @@ -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(