diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 8ba5e23..ca49012 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -1,5 +1,6 @@ name: CI/CD on: + release: push: schedule: - cron: '0 2 * * *' # run at 2 AM UTC @@ -37,8 +38,8 @@ jobs: release: runs-on: ubuntu-latest needs: tests - if: (github.event_name == 'push' || github.event_name =='release' )&& github.ref == 'refs/heads/master' - + if: github.event_name == 'release' || github.event_name == 'push' + steps: - uses: actions/checkout@v1 - uses: actions/setup-python@v1 @@ -62,7 +63,7 @@ jobs: repository_url: https://test.pypi.org/legacy/ - name: Release npkPy to PyPI - if: startsWith(github.event.ref, 'refs/tags') + if: github.event_name == 'release' uses: pypa/gh-action-pypi-publish@master with: password: ${{ secrets.PYPI_PASSWORD }}