From 12a66c2c037119e27ce3f568dd7d8984169433f5 Mon Sep 17 00:00:00 2001 From: Luca Palmieri <20745048+LukeMathWalker@users.noreply.github.com> Date: Tue, 7 Feb 2023 16:20:03 +0000 Subject: [PATCH] Instruct the release script to tag the commit on the release branch. It was previously left unspecified, resulting on a tag on the `main` branch. (#2322) --- .github/workflows/release-scripts/create-release.js | 4 ++++ .github/workflows/release.yml | 1 + 2 files changed, 5 insertions(+) diff --git a/.github/workflows/release-scripts/create-release.js b/.github/workflows/release-scripts/create-release.js index ad4f328e8f..fb10ea1b2c 100644 --- a/.github/workflows/release-scripts/create-release.js +++ b/.github/workflows/release-scripts/create-release.js @@ -44,10 +44,13 @@ module.exports = async ({ isDryRun, // Release manifest file path releaseManifestPath, + // The commit-like reference that we want to release (e.g. a commit SHA or a branch name) + releaseCommitish, }) => { assert(github !== undefined, "The `github` argument is required"); assert(isDryRun !== undefined, "The `isDryRun` argument is required"); assert(releaseManifestPath !== undefined, "The `releaseManifestPath` argument is required"); + assert(releaseCommitish !== undefined, "The `releaseCommitish` argument is required"); console.info(`Starting GitHub release creation with isDryRun: ${isDryRun}, and releaseManifestPath: '${releaseManifestPath}'`); @@ -74,6 +77,7 @@ module.exports = async ({ name: releaseManifest.name, body: releaseManifest.body, prerelease: releaseManifest.prerelease, + target_commitish: releaseCommitish, }); console.info(`SUCCESS: Created release with ID: ${response.data.id}, URL: ${response.data.html_url} `); } else { diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9c03c40930..8cd5e74287 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -184,6 +184,7 @@ jobs: github, isDryRun: ${{ inputs.dry_run }}, releaseManifestPath: "smithy-rs-release/smithy-rs-release-manifest.json" + releaseCommitish: ${{ needs.upgrade-gradle-properties.outputs.release_branch }}, }); - name: Publish to crates.io shell: bash