v2.0.0 #26
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test PyPI Publish Workflow | ||
on: release | ||
jobs: | ||
build-python-package: | ||
name: Version Verified Package Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Test the verify-version-tag action | ||
uses: ./verify-version-tag | ||
with: | ||
working_directory: ./test/dummy-package | ||
tag: "0.4.0" | ||
- name: Test the build-python-package action | ||
id: packaging | ||
uses: ./build-python-package | ||
with: | ||
working_directory: ./test/dummy-package | ||
- name: Upload package artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
path: ./test/dummy-package/dist | ||
define-matrix: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
versions: ${{ steps.version.outputs.python }} | ||
steps: | ||
- name: Define python versions | ||
id: version | ||
with: | ||
python_latest: false | ||
run: | | ||
Check failure on line 41 in .github/workflows/test-workflow.yml GitHub Actions / Test PyPI Publish WorkflowInvalid workflow file
|
||
PYTHON_LATEST=${{ inputs.python_latest }} | ||
if $PYTHON_LATEST; then | ||
echo 'python=["3.12"]' >> "$GITHUB_OUTPUT" | ||
else | ||
echo 'python=["3.9", "3.10", "3.11", "3.12"]' >> "$GITHUB_OUTPUT" | ||
fi | ||
test-package: | ||
name: Test Python Package | ||
needs: | ||
- build-python-package | ||
- define-matrix | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ${{ fromJSON(needs.define-matrix.outputs.versions) }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Download dist content | ||
uses: actions/download-artifact@v4 | ||
- name: Test the test-package action | ||
uses: ./test-package | ||
with: | ||
working_directory: ./test/dummy-package | ||
python_version: ${{ matrix.python-version }} | ||
publish-package: | ||
name: Test Publish Package | ||
needs: test-package | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Download dist content | ||
uses: actions/download-artifact@v4 | ||
- name: Test the publish-package action | ||
uses: ./publish-package | ||
with: | ||
test_pypi: "true" | ||
test_pypi_api_token: ${{ secrets.TEST_PYPI_API_TOKEN }} | ||
pypi_api_token: ${{ secrets.PYPI_API_TOKEN }} |