Skip to content

Commit

Permalink
MNT(action): no need for python matrix to publish
Browse files Browse the repository at this point in the history
  • Loading branch information
balbasty committed Oct 21, 2022
1 parent b56b3ab commit 8cd9f7d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/actions/publish/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Publish to PyPi
inputs:
python-version:
description: 'Python version'
required: true
required: false
default: '3.6'
publish:
description: 'Publish'
Expand Down
14 changes: 6 additions & 8 deletions .github/workflows/test-and-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ on:
- 'yes'
- 'no'
- 'needs'
python-version:
description: 'Python version'
required: false
default: '3.6'
# push:
# branches: [ main ]
# release
Expand Down Expand Up @@ -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:
Expand All @@ -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 }}

0 comments on commit 8cd9f7d

Please sign in to comment.