From 145aea3e478c76f7f0d8df3a9777cfdc3914240d Mon Sep 17 00:00:00 2001 From: Ryan McGinty Date: Fri, 6 Dec 2024 12:11:03 -0800 Subject: [PATCH] Update release workflow to include VERSION_TAG and adjust checkout reference --- .github/workflows/release.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e7b30a3..f9c882e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -34,6 +34,7 @@ jobs: MAJOR_VERSION: ${{ steps.get-version-and-commit-sha.outputs.MAJOR_VERSION }} MINOR_VERSION: ${{ steps.get-version-and-commit-sha.outputs.MINOR_VERSION }} PATCH_VERSION: ${{ steps.get-version-and-commit-sha.outputs.PATCH_VERSION }} + VERSION_TAG: ${{ steps.get-version-and-commit-sha.outputs.VERSION_TAG }} COMMIT_SHA: ${{ steps.get-version-and-commit-sha.outputs.COMMIT_SHA }} steps: - name: Checkout @@ -80,7 +81,8 @@ jobs: echo "PATCH_VERSION=$patch_version" >> $GITHUB_OUTPUT short_version="$major_version.$minor_version" echo "SHORT_VERSION=$short_version" >> $GITHUB_OUTPUT - commit_sha=$(git rev-parse $latest_tag) + echo "VERSION_TAG=$latest_tag" >> $GITHUB_OUTPUT + commit_sha=$(git rev-list -n 1 $latest_tag) echo "COMMIT_SHA=$commit_sha" >> $GITHUB_OUTPUT - name: Show version run: | @@ -89,6 +91,7 @@ jobs: echo MAJOR_VERSION: ${{ steps.get-version-and-commit-sha.outputs.MAJOR_VERSION }} echo MINOR_VERSION: ${{ steps.get-version-and-commit-sha.outputs.MINOR_VERSION }} echo PATCH_VERSION: ${{ steps.get-version-and-commit-sha.outputs.PATCH_VERSION }} + echo VERSION_TAG: ${{ steps.get-version-and-commit-sha.outputs.VERSION_TAG }} echo COMMIT_SHA: ${{ steps.get-version-and-commit-sha.outputs.COMMIT_SHA }} build: @@ -99,7 +102,8 @@ jobs: steps: - uses: actions/checkout@v4 with: - ref: ${{ needs.bump.outputs.COMMIT_SHA }} + ref: ${{ needs.bump.outputs.VERSION_TAG }} + ssh-key: ${{ secrets.AIBSGITHUB_PRIVATE_KEY }} - name: Set up Python ${{ github.event.inputs.python-version }} uses: actions/setup-python@v4 with: