From 3cd7fd0be5236e3d6bfd32e7101cbaa1509c41a9 Mon Sep 17 00:00:00 2001 From: Nikolaus Sonnenschein Date: Tue, 12 Oct 2021 16:58:47 +0200 Subject: [PATCH] chore: don't forget to build package before deploying it --- .github/workflows/main.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 31f5d749..e8e92451 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -61,6 +61,22 @@ jobs: python-version: [3.8] steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Get tag + id: tag + run: echo "::set-output name=version::${GITHUB_REF#refs/tags/}" + - name: Install dependencies + run: | + python -m pip install --upgrade pip setuptools wheel + python -m pip install twine + - name: Build package + run: python setup.py sdist bdist_wheel + - name: Check the package + run: twine check dist/* - name: Publish package if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') uses: pypa/gh-action-pypi-publish@release/v1