From 1b8029746e90a006974f36f24e33bd7a35c938b7 Mon Sep 17 00:00:00 2001 From: Simon Conseil Date: Sun, 27 Jun 2021 19:44:19 +0200 Subject: [PATCH] Fix condition in publish workflow --- .github/workflows/publish.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 94176b7..c6a449a 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -10,7 +10,7 @@ jobs: build-n-publish: name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI runs-on: ubuntu-latest - if: (github.repository == 'saimn/sigal' && (github.event_name == 'tags' || contains(github.event.pull_request.labels.*.name, 'Build wheels'))) + if: ((github.event_name == 'push' && startsWith(github.ref, 'refs/tags')) || contains(github.event.pull_request.labels.*.name, 'Build wheels')) steps: - uses: actions/checkout@master @@ -22,10 +22,13 @@ jobs: - name: Install python-build and twine run: python -m pip install build twine + - name: Build package run: python -m build --sdist --wheel . + - name: List result run: ls -l dist + - name: Check long_description run: python -m twine check dist/* @@ -33,4 +36,5 @@ jobs: if: startsWith(github.ref, 'refs/tags') uses: pypa/gh-action-pypi-publish@master with: + user: __token__ password: ${{ secrets.pypi_password }}