-
Notifications
You must be signed in to change notification settings - Fork 1.3k
32 lines (30 loc) · 1.07 KB
/
release.yml
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
name: Release
on:
workflow_dispatch:
push:
jobs:
Release:
if: "contains(github.event.head_commit.message, 'Bump version')"
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup ENV
run: echo "VERSION=$(echo ${{ github.event.head_commit.message }} | sed -r 's/Bump\s+version\s+?(to\s+?)?`?v?([a-z0-9.\-_]+)`?$/\2/')" >> $GITHUB_ENV
- name: Generate CHANGELOGS
run: |
chmod +x .github/workflows/generate_changelogs.sh
./.github/workflows/generate_changelogs.sh > CHANGELOGS.md
- name: Package Server
run: |
rm -fr .vscode .git*
zip -r ${{ github.WORKSPACE }}/TG-FileStreamBot-v${{ env.VERSION }}-main.zip *
- name: Release
uses: softprops/action-gh-release@v1
with:
name: TG-FileStreamBot-v${{ env.VERSION }} (main)
body_path: CHANGELOGS.md
files: |
${{ github.WORKSPACE }}/TG-FileStreamBot-v${{ env.VERSION }}-main.zip
prerelease: false
tag_name: v${{ env.VERSION }}