-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (36 loc) · 1.05 KB
/
release.yml
File metadata and controls
42 lines (36 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Create Release
on:
push:
tags:
- "v*"
jobs:
create-release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Extract version from tag
id: get_version
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
- name: Generate release notes
id: generate_notes
uses: mikepenz/release-changelog-builder-action@v3
with:
configuration: ".github/changelog-config.json"
commitMode: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Release
uses: softprops/action-gh-release@v1
with:
name: "LeetCLI v${{ env.VERSION }}"
body: ${{ steps.generate_notes.outputs.changelog }}
draft: false
prerelease: false
generate_release_notes: ${{ steps.generate_notes.outputs.changelog == '' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}