Skip to content

Commit d842831

Browse files
committed
Automate the process of GitHub release creation
Follow-up to https://github.com/rubocop/rubocop/blob/master/.github/workflows/github_release.yml. This action will be triggered when a new tag is pushed and will auto-fill the release notes using the relevant file. The `rubocop-performance` repository has essentially the same structure as the `rubocop` repository, so it should work as is.
1 parent eb68f96 commit d842831

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.github/workflows/github_release.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Create GitHub Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*" # Trigger when a version tag is pushed (e.g., v1.0.0)
7+
8+
jobs:
9+
create-release:
10+
runs-on: ubuntu-latest
11+
12+
permissions:
13+
contents: write
14+
15+
steps:
16+
- name: Checkout Code
17+
uses: actions/checkout@v4
18+
19+
- name: Create GitHub Release
20+
uses: ncipollo/release-action@v1
21+
with:
22+
tag: ${{ github.ref_name }}
23+
name: RuboCop Performance ${{ github.ref_name }}
24+
bodyFile: relnotes/${{ github.ref_name }}.md
25+
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)