From 8cd9f7d1012be4428b1161a161bb2e44e32149c8 Mon Sep 17 00:00:00 2001 From: Yael Balbastre Date: Fri, 21 Oct 2022 11:02:53 -0400 Subject: [PATCH] MNT(action): no need for python matrix to publish --- .github/actions/publish/action.yaml | 2 +- .github/workflows/test-and-publish.yaml | 14 ++++++-------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/actions/publish/action.yaml b/.github/actions/publish/action.yaml index 434bc65..66b4a71 100644 --- a/.github/actions/publish/action.yaml +++ b/.github/actions/publish/action.yaml @@ -3,7 +3,7 @@ description: Publish to PyPi inputs: python-version: description: 'Python version' - required: true + required: false default: '3.6' publish: description: 'Publish' diff --git a/.github/workflows/test-and-publish.yaml b/.github/workflows/test-and-publish.yaml index c486b57..a4675bf 100644 --- a/.github/workflows/test-and-publish.yaml +++ b/.github/workflows/test-and-publish.yaml @@ -23,6 +23,10 @@ on: - 'yes' - 'no' - 'needs' + python-version: + description: 'Python version' + required: false + default: '3.6' # push: # branches: [ main ] # release @@ -55,14 +59,11 @@ jobs: (github.event_name == 'push' && startsWith(github.ref, 'refs/tags'))) needs: test runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"] steps: - uses: actions/checkout@v2 - uses: ./.github/actions/publish with: - python-version: ${{ matrix.python-version }} + python-version: ${{ inputs.python-version }} publish: ${{ inputs.publish }} publish-only: @@ -72,14 +73,11 @@ jobs: (inputs.publish != 'auto' || (github.event_name == 'push' && startsWith(github.ref, 'refs/tags'))) runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"] steps: - uses: actions/checkout@v2 - uses: ./.github/actions/publish with: - python-version: ${{ matrix.python-version }} + python-version: ${{ inputs.python-version }} publish: ${{ inputs.publish }} password-pypi: ${{ secrets.pypi_token }} password-test: ${{ secrets.test_pypi_token }}