From 265e31966d33a3412b4bf5d2806a911f47cb5403 Mon Sep 17 00:00:00 2001 From: Ofek Lev Date: Sun, 17 Jul 2022 16:23:31 -0400 Subject: [PATCH 1/2] Add release job --- .github/workflows/publish.yml | 49 +++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..a2341b7 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,49 @@ +name: publish + +on: + push: + tags: + - v* + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: true + +jobs: + build: + name: Build a pure Python wheel and source distribution + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Install build dependencies + run: python -m pip install --upgrade build + + - name: Build + run: python -m build + + - uses: actions/upload-artifact@v3 + with: + name: artifacts + path: dist/* + if-no-files-found: error + + publish: + name: Publish release + runs-on: ubuntu-latest + needs: + - build + + steps: + - uses: actions/download-artifact@v3 + with: + name: artifacts + path: dist + + - name: Push build artifacts to PyPI + uses: pypa/gh-action-pypi-publish@v1.5.0 + with: + skip_existing: true + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} From 8622074137e88e804aeb605b4091af5d6e061d70 Mon Sep 17 00:00:00 2001 From: Ofek Lev Date: Mon, 18 Jul 2022 18:17:40 -0400 Subject: [PATCH 2/2] address --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index a2341b7..041c6e6 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -3,7 +3,7 @@ name: publish on: push: tags: - - v* + - '[0-9]+.[0-9]+.[0-9]+' concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}