Conditional publish
This commit is contained in:
parent
3cdfd3d7c7
commit
9c5e72f15b
|
@ -3,6 +3,9 @@ name: Python Package
|
|||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
PUBLISH:
|
||||
required: false
|
||||
default: false
|
||||
secrets:
|
||||
PIPY_REPO_USER:
|
||||
required: true
|
||||
|
@ -28,7 +31,9 @@ jobs:
|
|||
- name: Test Python Code
|
||||
run: python3 -m pytest test
|
||||
- name: Build
|
||||
if: always() && inputs.PUBLISH
|
||||
run: python3 -m build
|
||||
- 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/*
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user