updated run conditon

This commit is contained in:
Schmieder, Jacob
2024-05-31 14:34:02 +00:00
parent c62df0bd17
commit 89a7a733de
+10 -7
View File
@@ -1,19 +1,21 @@
name: Publish Python 🐍 distribution 📦 to PyPI and TestPyPI name: Publish Python 🐍 distribution 📦 to PyPI and TestPyPI
on: on:
push:
tags:
- v* # Push tags to trigger the workflow
pull_request: pull_request:
types: [closed] types: [closed]
branches: branches:
- develop - develop
- main
workflow_dispatch: workflow_dispatch:
inputs: inputs:
test: job:
description: "Push to TestPyPI not PyPI" description: "Select job to run"
default: true required: true
type: boolean type: choice
options:
- Build-and-publish-to-Test-PyPI
- test-install
- publish-to-pypi
jobs: jobs:
Build-and-publish-to-Test-PyPI: Build-and-publish-to-Test-PyPI:
@@ -57,6 +59,7 @@ jobs:
steps: steps:
- name: Checkout Repository Tags - name: Checkout Repository Tags
uses: actions/checkout@v4 uses: actions/checkout@v4
if: github.ref == 'refs/heads/main'
with: with:
fetch-depth: '0' fetch-depth: '0'
branch: 'main' branch: 'main'