From 7b352c281f5e689cbc5fd8612474ed02fdb8909d Mon Sep 17 00:00:00 2001 From: Ben Zhang Date: Sun, 6 Oct 2024 17:05:51 -0700 Subject: [PATCH] Add sanity check before publishing (#7) This PR adds a sanity check to the built wheel before publishing. --- .github/workflows/build-and-publish.yml | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-and-publish.yml b/.github/workflows/build-and-publish.yml index 681dfcc..ba2f66b 100644 --- a/.github/workflows/build-and-publish.yml +++ b/.github/workflows/build-and-publish.yml @@ -38,9 +38,32 @@ jobs: name: build-artifacts path: dist/ - publish: + sanity-check: runs-on: ubuntu-latest needs: build + steps: + - name: Download artifact + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: build-artifacts + path: dist/ + + - name: Set up Python + uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 + with: + python-version: '3.11' + + - name: Install wheel + run: | + pip install dist/*.whl + + - name: Run sanity check + run: | + gatrace --help + + publish: + runs-on: ubuntu-latest + needs: sanity-check if: github.event_name == 'release' steps: - name: Download artifact