From 2504f1cc0440b7e048edbfe4ca3c362a348ee96e Mon Sep 17 00:00:00 2001 From: Alex Joz Date: Sun, 31 Jan 2021 11:34:20 +0200 Subject: [PATCH] push on release only (#5) --- .github/workflows/release.yaml | 29 ----------------------------- .github/workflows/wheels.yaml | 24 +++++++++++++++++++++++- pyproject.toml | 2 +- 3 files changed, 24 insertions(+), 31 deletions(-) delete mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml deleted file mode 100644 index 5093f37..0000000 --- a/.github/workflows/release.yaml +++ /dev/null @@ -1,29 +0,0 @@ -name: RELEASE - -on: - workflow_run: - workflows: ["WHL"] - branches: [master] - types: - - completed - -jobs: - upload_ofcl_pypi: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - - uses: actions/download-artifact@v2 - - - name: Display structure of downloaded files - run: ls -R - working-directory: ./dist/ - - - name: Publish package to PyPI - if: startsWith(github.ref, 'refs/tags') - uses: pypa/gh-action-pypi-publish@master - with: - user: __token__ - password: ${{ secrets.POETRY_HTTP_BASIC_PYPI_FASTFM2_TOKEN }} - repository_url: https://upload.pypi.org/legacy/ - # verbose: true diff --git a/.github/workflows/wheels.yaml b/.github/workflows/wheels.yaml index cef5c7d..8cff719 100644 --- a/.github/workflows/wheels.yaml +++ b/.github/workflows/wheels.yaml @@ -2,6 +2,8 @@ name: WHL on: push: + release: + types: [published] workflow_dispatch: jobs: @@ -79,4 +81,24 @@ jobs: with: name: dist path: ./dist/*.whl - \ No newline at end of file + + upload_ofcl_pypi: + needs: build_wheels + runs-on: ubuntu-latest + if: github.event_name == 'release' + steps: + - uses: actions/checkout@v2 + + - uses: actions/download-artifact@v2 + + - name: Display structure of downloaded files + run: ls -R + working-directory: ./dist/ + + - name: Publish package to PyPI + uses: pypa/gh-action-pypi-publish@master + with: + user: __token__ + password: ${{ secrets.POETRY_HTTP_BASIC_PYPI_FASTFM2_TOKEN }} + repository_url: https://upload.pypi.org/legacy/ + # verbose: true diff --git a/pyproject.toml b/pyproject.toml index a8c606f..5a51722 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "fastfm2" -version = "0.4.2" +version = "0.4.3" description = "A Library for Factorization Machines" authors = ["palaimon.io "] license = "GNU AGPLv3"