From 298b88baa36d5f1c0e04cff6f2dd4b97dea6546b Mon Sep 17 00:00:00 2001 From: Philip Hackstock <20710924+phackstock@users.noreply.github.com> Date: Thu, 10 Aug 2023 17:17:08 +0200 Subject: [PATCH] Set up alternative publishing workflow for repositories --- .github/workflows/publish_test.yaml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish_test.yaml b/.github/workflows/publish_test.yaml index 275a3ad9..f4156ce3 100644 --- a/.github/workflows/publish_test.yaml +++ b/.github/workflows/publish_test.yaml @@ -1,7 +1,12 @@ # copied from https://github.com/marketplace/actions/install-poetry-action name: publish (alternative) -on: pull_request +on: + push: + tags: ["v*"] + release: + types: ["published"] + workflow_dispatch: jobs: publish: @@ -28,6 +33,13 @@ jobs: installer-parallel: true - name: Install poetry dynamic versioning plugin run: poetry self add "poetry-dynamic-versioning[plugin]" - - name: Build & publish ixmp4 - run: poetry publish --build --dry-run + - name: Register test pypi + run: poetry config repositories.test-pypi https://test.pypi.org/legacy/ + - if: github.event_name = 'release' + name: Build & publish ixmp4 to pypi + run: poetry publish --build + - if: github.event_name != 'release' + name: Build & publish ixmp4 to testpypi + run: poetry publish --build -r test-pypi +