diff --git a/.github/workflows/release-candidate.yml b/.github/workflows/release-candidate.yml index 4f940902a..56be7fc14 100644 --- a/.github/workflows/release-candidate.yml +++ b/.github/workflows/release-candidate.yml @@ -63,7 +63,7 @@ jobs: fi echo "SDK_RC_VERSION=$(poetry version -s)" >> $GITHUB_ENV echo "SDK_VERSION=$(poetry version ${{ inputs.version }} -s --dry-run)" >> $GITHUB_ENV - echo "version=$(poetry rc_version -s)" >> $GITHUB_OUTPUT + echo "rc_version=$(poetry version -s)" >> $GITHUB_OUTPUT echo "version=$(poetry version ${{ inputs.version }} -s --dry-run)" >> $GITHUB_OUTPUT - name: Check if release exists @@ -85,7 +85,7 @@ jobs: with: commit-message: Bump version to ${{ env.RC_SDK_VERSION }} branch: rc-${{ env.SDK_VERSION }} - delete-branch: true + delete-branch: false base: main title: rc-${{ env.SDK_VERSION }} body: This is an auto-generated PR to merge the rc branch back into main upon successful release. diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1485403bc..2702a8246 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -70,7 +70,7 @@ jobs: build: needs: prepare - if: github.repository_owner == 'viamrobotics' && github.ref == 'refs/heads/main' + if: github.repository_owner == 'viamrobotics' && startsWith(github.ref, 'rc-') runs-on: [self-hosted, x64] container: image: ghcr.io/viamrobotics/canon:amd64 @@ -121,7 +121,7 @@ jobs: release: needs: [prepare, build] - if: github.repository_owner == 'viamrobotics' && github.ref == 'refs/heads/main' + if: github.repository_owner == 'viamrobotics' && startsWith(github.ref, 'rc-') runs-on: [self-hosted, x64] container: image: ghcr.io/viamrobotics/canon:amd64 @@ -137,3 +137,4 @@ jobs: draft: true prerelease: false fail_on_unmatched_files: true + target_commitish: rc-${{ needs.prepare.outputs.version }}