Skip to content

Commit f1c7ca9

Browse files
authored
fix(ci): Fix broken cargo-dist releasing (#244)
Last step of cargo-dist was not updated properly and it is not able to create GH release as required in order to upload artifacts.
1 parent 23b1121 commit f1c7ca9

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,11 @@ jobs:
308308
- name: Create GitHub Release
309309
env:
310310
PRERELEASE_FLAG: "${{ fromJson(needs.host.outputs.val).announcement_is_prerelease && '--prerelease' || '' }}"
311+
ANNOUNCEMENT_TITLE: "${{ fromJson(needs.host.outputs.val).announcement_title }}"
312+
ANNOUNCEMENT_BODY: "${{ fromJson(needs.host.outputs.val).announcement_github_body }}"
311313
run: |
314+
# Write and read notes from a file to avoid quoting breaking things
315+
echo "$ANNOUNCEMENT_BODY" > $RUNNER_TEMP/notes.txt
312316
313-
gh release edit "${{ needs.plan.outputs.tag }}" --draft=false $PRERELEASE_FLAG
317+
gh release create "${{ needs.plan.outputs.tag }}" --title "$ANNOUNCEMENT_TITLE" --notes-file "$RUNNER_TEMP/notes.txt" $PRERELEASE_FLAG
314318
gh release upload "${{ needs.plan.outputs.tag }}" artifacts/*

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ targets = ["aarch64-apple-darwin", "x86_64-apple-darwin", "x86_64-unknown-linux-
5353
# Publish jobs to run in CI
5454
pr-run-mode = "upload"
5555
# Whether cargo-dist should create a Github Release or use an existing draft
56-
create-release = false
56+
create-release = true
5757
# Whether to install an updater program
5858
install-updater = true
5959
# Whether to enable GitHub Attestations

0 commit comments

Comments
 (0)