Skip to content

Commit

Permalink
Instruct the release script to tag the commit on the release branch. …
Browse files Browse the repository at this point in the history
…It was previously left unspecified, resulting on a tag on the `main` branch. (smithy-lang#2322)
  • Loading branch information
LukeMathWalker committed Feb 7, 2023
1 parent 18bfa20 commit 12a66c2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/release-scripts/create-release.js
Expand Up @@ -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}'`);

Expand All @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Expand Up @@ -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
Expand Down

0 comments on commit 12a66c2

Please sign in to comment.