Commit 645c9535
645c95358ebdMerged
Dmitriy Zhilyaev <[email protected]> ยท 2 years ago ยท 1 file ยท ~1 modified
Description
Merge pull request #976
release/0.40.1
Details
- Commit
- 645c95358ebd
- Parent
- d1e6bdc0035b
- Merge parent
- f9874a19953f
.github/workflows/release-tag.ymlmodifiedView file
@@ -21,7 +21,7 @@
2121
# https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/triggering-a-workflow#triggering-a-workflow-from-a-workflow2222
github-token: ${{ secrets.PAT }}2323
script: |-224-
const tag = context.payload.pull_request.head.ref.replace("release/", "v");24+
const tag = context.payload.pull_request.head.ref.replace("release/", "v")2525
const ref = {2626
owner: context.repo.owner,2727
repo: context.repo.repo,@@ -29,22 +29,8 @@
2929
sha: context.payload.pull_request.merge_commit_sha,3030
}3131
32-
try {33-
await github.rest.git.getRef(ref);34-
await github.rest.git.updateRef({...ref, force: true});35-
console.log("tag has been updated");36-
37-
} catch (err) {38-
if (err.status === 404) {39-
await github.rest.git.createRef(ref);40-
console.log("tag has been created");41-
} else {42-
console.log("just error");43-
throw err;44-
}45-
}32+
await github.rest.git.createRef(ref)4633
4734
result-encoding: string4835
retry-exempt-status-codes: 400,40149-
debug: true5036