Skip to content

Commit 957e1f1

Browse files
authored
ci: fix release workflow (#9)
1 parent baf73ee commit 957e1f1

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Make releases from tags
1+
name: Publish to crates.io and create GitHub release
22
on:
33
push:
44
tags: ['v*']
@@ -22,12 +22,12 @@ jobs:
2222
- name: Create release body
2323
id: create_release_body
2424
run: |
25-
RELEASEVERSION="[${{ github.ref_name.slice(1) }}]"
26-
echo "Version: $RELEASEVERSION"
27-
RELEASEBODY=$(awk -v ver="$RELEASEVERSION" '/^## / { if (p) { exit }; if ($2 == ver) { p=1; next } } p && NF' CHANGELOG.md)
25+
RELEASE_VERSION="${{ github.ref_name.slice }}"
26+
echo "Version: $RELEASE_VERSION"
27+
RELEASE_BODY=$(awk -v ver="[${RELEASE_VERSION:1}]" '/^## / { if (p) { exit }; if ($2 == ver) { p=1; next } } p && NF' CHANGELOG.md)
2828
{
29-
echo 'RELEASEBODY<<EOF'
30-
echo "${RELEASEBODY}"
29+
echo 'RELEASE_BODY<<EOF'
30+
echo "${RELEASE_BODY}"
3131
echo EOF
3232
} >> $GITHUB_OUTPUT
3333
@@ -36,6 +36,6 @@ jobs:
3636
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3737
run: |
3838
echo "Creating release for ${{ github.ref_name }}"
39-
echo "${{ steps.create_release_body.outputs.RELEASEBODY }}"
40-
gh release create "${{ github.ref_name }}" --title "${{ github.ref_name }}" --notes "${{ steps.create_release_body.outputs.RELEASEBODY }}"
39+
echo "${{ steps.create_release_body.outputs.RELEASE_BODY }}"
40+
gh release create "${{ github.ref_name }}" --title "${{ github.ref_name }}" --notes "${{ steps.create_release_body.outputs.RELEASE_BODY }}"
4141
echo "Release created successfully"

0 commit comments

Comments
 (0)