Skip to content

Commit 819440f

Browse files
committed
cicd: added github release
1 parent 7c512aa commit 819440f

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.github/workflows/rust.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,49 @@ jobs:
3636
dry-run: true # test
3737
# Extra post publish delay (milliseconds)
3838
publish-delay: 5000
39+
40+
41+
github_release:
42+
name: Generate Github release
43+
runs-on: ubuntu-latest
44+
needs: [publish]
45+
steps:
46+
- uses: actions/checkout@v3
47+
with:
48+
ref: ${{ needs.bump_version.outputs.commit }}
49+
50+
- name: Generate changelog
51+
id: github_changelog
52+
uses: mikepenz/release-changelog-builder-action@v4
53+
with:
54+
fromTag: v${{ needs.bump_version.outputs.previous_version }}
55+
toTag: ${{ needs.bump_version.outputs.commit }}
56+
outputFile: ${{ github.workspace }}/.github/changelog.txt
57+
env:
58+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
59+
60+
# - name: Generate release notes
61+
# run: |
62+
# # Generate the release notes
63+
# echo "Generating release notes..."
64+
# echo ""
65+
# echo "Changelog: "
66+
# cat ${{ github.workspace }}/.github/changelog.txt
67+
# echo ""
68+
# cat ${{ github.workspace }}/.github/release_notes.template ${{ github.workspace }}/.github/changelog.txt \
69+
# | sed 's/{version}/${{ env.VERSION }}/g' \
70+
# > ${{ github.workspace }}/.github/release_notes.txt
71+
# env:
72+
# VERSION: ${{ needs.bump_version.outputs.version }}
73+
74+
- name: Create release
75+
uses: softprops/action-gh-release@v1
76+
id: rules_rust_release
77+
env:
78+
GIT_TAG: ${{ needs.bump_version.outputs.tag }}
79+
COMMIT: ${{ needs.bump_version.outputs.commit }}
80+
with:
81+
generate_release_notes: true
82+
tag_name: ${{ env.GIT_TAG }}
83+
body_path: ${{ github.workspace }}/.github/release_notes.txt
84+
target_commitish: ${{ env.COMMIT }}

0 commit comments

Comments
 (0)