Conditional publish
This commit is contained in:
parent
3cdfd3d7c7
commit
9c5e72f15b
|
@ -3,6 +3,9 @@ name: Python Package
|
||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
inputs:
|
inputs:
|
||||||
|
PUBLISH:
|
||||||
|
required: false
|
||||||
|
default: false
|
||||||
secrets:
|
secrets:
|
||||||
PIPY_REPO_USER:
|
PIPY_REPO_USER:
|
||||||
required: true
|
required: true
|
||||||
|
@ -28,7 +31,9 @@ jobs:
|
||||||
- name: Test Python Code
|
- name: Test Python Code
|
||||||
run: python3 -m pytest test
|
run: python3 -m pytest test
|
||||||
- name: Build
|
- name: Build
|
||||||
|
if: always() && inputs.PUBLISH
|
||||||
run: python3 -m build
|
run: python3 -m build
|
||||||
- name: Publish
|
- name: Publish
|
||||||
|
if: always() && inputs.PUBLISH
|
||||||
run: python3 -m twine upload --repository-url "https://gitfub.space/api/packages/${{ secrets.PIPY_REPO_USER }}/pypi" -u ${{ secrets.PIPY_REPO_USER }} -p ${{ secrets.PIPY_REPO_PASS }} dist/*
|
run: python3 -m twine upload --repository-url "https://gitfub.space/api/packages/${{ secrets.PIPY_REPO_USER }}/pypi" -u ${{ secrets.PIPY_REPO_USER }} -p ${{ secrets.PIPY_REPO_PASS }} dist/*
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user