From b76eb97188c204996d049d326b4d21c74bc3f325 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sun, 2 Oct 2022 12:00:03 -1000 Subject: [PATCH] fix: use semantic-release to find the latest tag for wheels (#65) --- .github/workflows/ci.yml | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 57b0be3..47f2028 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -97,12 +97,6 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} pypi_token: ${{ secrets.PYPI_TOKEN }} - - name: Save Release SHA - id: release_sha - shell: bash - run: | - echo "::set-output name=saved_release_sha::$(git rev-parse --short HEAD)" - build_wheels: needs: [release] @@ -115,11 +109,26 @@ jobs: steps: - uses: actions/checkout@v3 with: - ref: ${{ steps.release_sha.outputs.saved_release_sha }} - fetch-depth: 0 + fetch-depth: 100 + ref: HEAD - name: Install poetry run: pipx install poetry + + - name: Install semantic-release + run: pipx install semantic-release + + - name: Get Release Tag + id: release_tag + shell: bash + run: | + echo "::set-output name=newest_release_tag::$(semantic-release print-version --current)" + + - uses: actions/checkout@v3 + with: + ref: "v${{ steps.release_tag.outputs.newest_release_tag }}" + fetch-depth: 0 + # Used to host cibuildwheel - name: Set up Python uses: actions/setup-python@v4