From 9b08b0694eca7e1645ae5a0d699b3dbb2f15d7db Mon Sep 17 00:00:00 2001 From: Evgeniy Alekseev Date: Mon, 5 Apr 2021 00:37:03 +0300 Subject: [PATCH] try to make auto archive upload --- .../{bug_report.md => bug-report.md} | 0 ...{feature_request.md => feature-request.md} | 0 .github/workflows/release.yml | 28 +++++++++++++++++++ .../{python-app.yml => run-tests.yml} | 5 ++-- src/ahriman/core/status/web_client.py | 2 +- 5 files changed, 31 insertions(+), 4 deletions(-) rename .github/ISSUE_TEMPLATE/{bug_report.md => bug-report.md} (100%) rename .github/ISSUE_TEMPLATE/{feature_request.md => feature-request.md} (100%) create mode 100644 .github/workflows/release.yml rename .github/workflows/{python-app.yml => run-tests.yml} (95%) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug-report.md similarity index 100% rename from .github/ISSUE_TEMPLATE/bug_report.md rename to .github/ISSUE_TEMPLATE/bug-report.md diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature-request.md similarity index 100% rename from .github/ISSUE_TEMPLATE/feature_request.md rename to .github/ISSUE_TEMPLATE/feature-request.md diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..9d8eb198 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,28 @@ +name: create release + +on: + push: + tags: + - '*.*.*' + +jobs: + make-release: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: extract version + id: version + run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/} + - name: create archive + run: make archive + env: + VERSION: ${{ steps.version.outputs.VERSION }} + - name: Release + uses: softprops/action-gh-release@v1 + with: + files: ahriman-$VERSION-src.tar.xz + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + VERSION: ${{ steps.version.outputs.VERSION }} diff --git a/.github/workflows/python-app.yml b/.github/workflows/run-tests.yml similarity index 95% rename from .github/workflows/python-app.yml rename to .github/workflows/run-tests.yml index 93157bb4..08d9259a 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/run-tests.yml @@ -1,6 +1,5 @@ # based on https://github.com/actions/starter-workflows/blob/main/ci/python-app.yml - -name: ahriman +name: check commit on: push: @@ -9,7 +8,7 @@ on: branches: [ master ] jobs: - build: + run-tests: runs-on: ubuntu-latest diff --git a/src/ahriman/core/status/web_client.py b/src/ahriman/core/status/web_client.py index bc4c7937..531b0890 100644 --- a/src/ahriman/core/status/web_client.py +++ b/src/ahriman/core/status/web_client.py @@ -52,7 +52,7 @@ class WebClient(Client): :param exception: exception raised :return: text of the response if it is not None and empty string otherwise """ - result: str = exception.response.text if exception.response is not None else '' + result: str = exception.response.text if exception.response is not None else "" return result def _ahriman_url(self) -> str: