From 2d79a1bdb54ff9a7b6ffcdb7481485e7fc47bda5 Mon Sep 17 00:00:00 2001 From: Rocco Meli Date: Mon, 1 Aug 2022 11:05:41 +0100 Subject: [PATCH] cleanup deploy action with @IAlibay tips --- .github/workflows/deploy.yaml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 1e520c2..8a6b9fc 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -2,8 +2,6 @@ name: Deploy gninatorch on: push: - branches: - - master tags: - "*" release: @@ -14,7 +12,6 @@ defaults: run: shell: bash -l {0} - jobs: build: if: "github.repository == 'RMeli/gnina-torch'" @@ -44,3 +41,12 @@ jobs: user: __token__ password: ${{ secrets.TEST_PYPI_TOKEN }} repository_url: https://test.pypi.org/legacy/ + + # TODO: Install package and run tests from TestPyPI + + - name: Publish on TestPyPI + if: github.event_name == 'release' && github.event.action == 'published' + uses: pypa/gh-action-pypi-publish@v1.5.0 + with: + user: __token__ + password: ${{ secrets.PYPI_TOKEN }}