Skip to content

Commit 31f3788

Browse files
authored
More release fixes (#3418)
1 parent 48e85c2 commit 31f3788

1 file changed

Lines changed: 15 additions & 17 deletions

File tree

.github/workflows/release.yml

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -153,25 +153,23 @@ jobs:
153153
--rawfile pkgContent package.json \
154154
--rawfile lockContent package-lock.json \
155155
'{
156-
branch: { repositoryNameWithOwner: $repo, branchName: "main" },
157-
message: { headline: $headline },
158-
parentCommitId: $parentSha,
159-
fileChanges: {
160-
additions: [
161-
{ path: "package.json", contents: ($pkgContent | @base64) },
162-
{ path: "package-lock.json", contents: ($lockContent | @base64) }
163-
]
156+
query: "mutation($input: CreateCommitOnBranchInput!) { createCommitOnBranch(input: $input) { commit { oid } } }",
157+
variables: {
158+
input: {
159+
branch: { repositoryNameWithOwner: $repo, branchName: "main" },
160+
message: { headline: $headline },
161+
parentCommitId: $parentSha,
162+
fileChanges: {
163+
additions: [
164+
{ path: "package.json", contents: ($pkgContent | @base64) },
165+
{ path: "package-lock.json", contents: ($lockContent | @base64) }
166+
]
167+
}
168+
}
164169
}
165-
}' > /tmp/commit-input.json
170+
}' > /tmp/request.json
166171
167-
COMMIT_SHA=$(gh api graphql \
168-
-f query='
169-
mutation($input: CreateCommitOnBranchInput!) {
170-
createCommitOnBranch(input: $input) {
171-
commit { oid }
172-
}
173-
}' \
174-
--field input:json=@/tmp/commit-input.json \
172+
COMMIT_SHA=$(gh api graphql --input /tmp/request.json \
175173
--jq '.data.createCommitOnBranch.commit.oid')
176174
177175
echo "release_tag=$RELEASE_TAG" >> "$GITHUB_OUTPUT"

0 commit comments

Comments
 (0)