Skip to content

Commit

Permalink
Add workflow dispatch
Browse files Browse the repository at this point in the history
  • Loading branch information
KarelZe committed Dec 4, 2023
1 parent e874a5b commit 78c3268
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ on:
release:
types: [published]

# Enable manual run
workflow_dispatch:

jobs:
deploy:
runs-on: ubuntu-latest
Expand All @@ -21,14 +24,21 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@v1
- name: Publish distribution 📦 to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{secrets.TEST_PYPI_API_TOKEN}}
repository-url: https://test.pypi.org/legacy/
skip-existing: true
- name: Publish distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit 78c3268

Please sign in to comment.