From 7328dc66ad0ddf09f6d1b41a79f17c22031d6ed0 Mon Sep 17 00:00:00 2001 From: Quentin Gliech Date: Fri, 24 Jan 2025 15:00:27 +0100 Subject: [PATCH] Fix creating refs with the GitHub API See https://github.com/octokit/rest.js/issues/339#issuecomment-1685256703 --- .github/workflows/release-branch.yaml | 2 +- .github/workflows/tag.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-branch.yaml b/.github/workflows/release-branch.yaml index 576825b76..5c7b0eec8 100644 --- a/.github/workflows/release-branch.yaml +++ b/.github/workflows/release-branch.yaml @@ -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, diff --git a/.github/workflows/tag.yaml b/.github/workflows/tag.yaml index c33f0b5dc..9370c864d 100644 --- a/.github/workflows/tag.yaml +++ b/.github/workflows/tag.yaml @@ -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);