From 19578b60ca89cc29eb410f1fcb4559131d4f2117 Mon Sep 17 00:00:00 2001 From: Thomas Wilmering Date: Mon, 12 Feb 2024 10:48:02 +0000 Subject: [PATCH] add missing file content of publish.yml --- .github/workflows/publish.yml | 47 +++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e69de29..a089648 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -0,0 +1,47 @@ +--- +name: publish + +on: + push: + tags: # trigger the deploy job on tag creation + - "*" # Note: not all tags will result in allowed pypi version identifier + workflow_dispatch: # allows for manual trigger + +permissions: + contents: read + +jobs: + publish: + + runs-on: ubuntu-latest + + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Install Task + uses: arduino/setup-task@v1 + + - name: Set up python + id: setup-python + uses: actions/setup-python@v4 + with: + python-version: '3.11' + + - name: Install and configure poetry + uses: snok/install-poetry@v1 + with: + virtualenvs-create: true + virtualenvs-in-project: true + installer-parallel: true + + - name: Install dynamic versioning plugin + run: | + poetry self add "poetry-dynamic-versioning[plugin]" + + - name: Publish Package + env: + PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} + run: | + poetry config pypi-token.pypi "$PYPI_TOKEN" + poetry publish --build