Skip to content

Commit 2a458b0

Browse files
committed
Handle releases again
1 parent f36b8af commit 2a458b0

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

.github/workflows/rust-ci.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ name: Rust CI
22
on:
33
push:
44
branches: [main]
5+
tags:
6+
- "*"
57
paths:
68
- "**/*.rs"
79
- "**/Cargo.toml"
@@ -103,3 +105,32 @@ jobs:
103105
with:
104106
fail_ci_if_error: true
105107
token: ${{ secrets.CODECOV_TOKEN }}
108+
release:
109+
if: startsWith(github.ref, 'refs/tags/')
110+
needs: [check, clippy, fmt, fmt-nightly, test, coverage]
111+
runs-on: ubuntu-latest
112+
permissions:
113+
contents: write
114+
pull-requests: read
115+
discussions: write
116+
steps:
117+
- uses: actions/checkout@v4
118+
with:
119+
fetch-depth: 0
120+
121+
- name: Build Changelog
122+
id: github_release
123+
uses: mikepenz/release-changelog-builder-action@v5
124+
env:
125+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
126+
127+
- name: Create Release
128+
uses: actions/create-release@v1
129+
env:
130+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
131+
with:
132+
tag_name: ${{ github.ref }}
133+
release_name: Release ${{ github.ref }}
134+
body: ${{steps.github_release.outputs.changelog}}
135+
draft: false
136+
prerelease: false

0 commit comments

Comments
 (0)