Fix creating refs with the GitHub API

See https://github.com/octokit/rest.js/issues/339#issuecomment-1685256703
This commit is contained in:
Quentin Gliech
2025-01-24 15:00:27 +01:00
parent cca6085841
commit fda984c26d
2 changed files with 2 additions and 2 deletions

View File

@@ -93,7 +93,7 @@ jobs:
const [owner, repo] = process.env.GITHUB_REPOSITORY.split('/');
const branch = process.env.BRANCH;
const sha = process.env.SHA;
const ref = `heads/${branch}`;
const ref = `refs/heads/${branch}`;
await github.rest.git.createRef({
owner,

View File

@@ -134,7 +134,7 @@ jobs:
const tag = await github.rest.git.createRef({
owner,
repo,
ref: `tags/v${version}`,
ref: `refs/tags/v${version}`,
sha: tagSha,
});
console.log("Created tag ref:", tag.data.url);