aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/.github/workflows
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/python-publish.yml50
1 files changed, 25 insertions, 25 deletions
diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml
index ba5bf1c7..2464c134 100644
--- a/.github/workflows/python-publish.yml
+++ b/.github/workflows/python-publish.yml
@@ -1,31 +1,31 @@
-# This workflow will upload a Python Package using Twine when a release is created
-# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
-
-name: Upload Python Package
-
on:
- release:
- types: [created]
+ push:
+ tags:
+ - "v*"
+ workflow_dispatch:
jobs:
- deploy:
-
+ build:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v2
- with:
- python-version: '3.9'
- - name: Install dependencies
- run: |
- python3 -m pip install --upgrade build
- python3 -m pip install --user --upgrade twine
- - name: Build and publish
- env:
- TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
- TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
- run: |
- python3 -m build
- python3 -m twine upload dist/*
+ - uses: actions/checkout@v3
+
+ - name: Install poetry
+ run: pipx install poetry
+ shell: bash
+ - uses: actions/setup-python@v4
+ with:
+ python-version: "3.9"
+ architecture: "x64"
+ cache: "poetry"
+ - run: poetry install
+ shell: bash
+
+ - run: poetry config pypi-token.pypi "$PYPI_TOKEN"
+ shell: bash
+ env:
+ PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
+
+ - run: poetry publish --build
+ shell: bash