From fdd71098ef4c9939c0a6867d3914984857393151 Mon Sep 17 00:00:00 2001 From: Harris Tzovanakis Date: Tue, 16 Jul 2024 10:41:50 +0200 Subject: [PATCH] gh-actions: fix actions --- .github/workflows/bump.yml | 33 ++++++++++++++++++++++++++++ .github/workflows/publish.yml | 39 ---------------------------------- .github/workflows/push-tag.yml | 16 -------------- 3 files changed, 33 insertions(+), 55 deletions(-) delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/push-tag.yml diff --git a/.github/workflows/bump.yml b/.github/workflows/bump.yml index 9d2efeb..d66242b 100644 --- a/.github/workflows/bump.yml +++ b/.github/workflows/bump.yml @@ -46,3 +46,36 @@ jobs: github_token: ${{ secrets.PAT }} tags: true + publish: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.11" + + - name: Install python dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools wheel + pip install -e .[tests,elasticsearch5] + + - name: Show python dependencies + run: | + python3 --version + pip freeze + + - name: Build package + run: | + python setup.py sdist bdist_wheel + + - name: Publish package + uses: pypa/gh-action-pypi-publish@v1.9.0 + with: + user: __token__ + password: ${{ secrets.pypi_password }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index 4a5c04f..0000000 --- a/.github/workflows/publish.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Publish to pypi - -on: - workflow_call: - -jobs: - publish: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: "3.11" - - - name: Install python dependencies - run: | - python -m pip install --upgrade pip - pip install setuptools wheel - pip install -e .[tests,elasticsearch5] - - - name: Show python dependencies - run: | - python3 --version - pip freeze - - - name: Build package - run: | - python setup.py sdist bdist_wheel - - - name: Publish package - uses: pypa/gh-action-pypi-publish@v1.9.0 - with: - user: __token__ - password: ${{ secrets.pypi_password }} diff --git a/.github/workflows/push-tag.yml b/.github/workflows/push-tag.yml deleted file mode 100644 index 54b0c8b..0000000 --- a/.github/workflows/push-tag.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: Publish package - -on: - push: - tags: - - "*" -jobs: - python2_tests: - uses: ./.github/workflows/test-python-2.yml - - python3_tests: - uses: ./.github/workflows/test-python-3.yml - - publish_package: - needs: [python2_tests, python3_tests] - uses: ./.github/workflows/publish.yml