-
Notifications
You must be signed in to change notification settings - Fork 2
54 lines (44 loc) · 1.35 KB
/
auto-release.yml
File metadata and controls
54 lines (44 loc) · 1.35 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
43
44
45
46
47
48
49
50
51
52
53
54
name: Auto Release
on:
push:
branches:
- main
paths:
- MercurySQL/VERSION
permissions:
contents: write
jobs:
release:
name: Auto Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 2
- name: Get previous version
id: prev_version
run: |
echo "PREV_VERSION=$(git show HEAD^:MercurySQL/VERSION)" >> $GITHUB_ENV
- name: Get current version
id: current_version
run: |
echo "CURR_VERSION=$(cat MercurySQL/VERSION)" >> $GITHUB_ENV
- name: Generate release note
id: release_note
run: |
echo "This is release note" > release_note.txt
echo "" >> release_note.txt
echo "RELEASE_NOTE=$(cat release_note.txt)" >> $GITHUB_ENV
- name: Create Release
uses: actions/create-release@v1
with:
tag_name: v${{ env.CURR_VERSION }}
release_name: v${{ env.CURR_VERSION }}
body: |
From ${{ env.PREV_VERSION }} -> ${{ env.CURR_VERSION }}
${{ env.RELEASE_NOTE }}
**Full Changelog**: https://github.com/BernieHuang2008/MercurySQL/compare/v${{ env.PREV_VERSION }}...v${{ env.CURR_VERSION }}
draft: true
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}