-
-
Notifications
You must be signed in to change notification settings - Fork 564
42 lines (34 loc) · 1.28 KB
/
create_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
33
34
35
36
37
38
39
40
41
42
name: Create Release
run-name: Create Release v${{ github.event.inputs.version }}
on:
workflow_dispatch:
inputs:
version:
description: 'New Version (do not include v)'
required: true
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.CREATE_RELEASE_TOKEN }}
- name: Update App Version
run: |
sed -i 's/APP_VERSION = ".*"/APP_VERSION = "${{ github.event.inputs.version }}"/' src/Version.pri
- name: Update Flatpak Version
run: |
sed -i "s@<releases>@<releases>\n <release version=\"v${{ github.event.inputs.version }}\" date=\"$(date +'%Y-%m-%d')\" />@" deploy/linux/com.github.dail8859.NotepadNext.metainfo.xml
- name: Commit changes
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add src/Version.pri deploy/linux/com.github.dail8859.NotepadNext.metainfo.xml
git commit -m "v${{ github.event.inputs.version }} release"
- name: Tag commit
run: |
git tag v${{ github.event.inputs.version }}
- name: Push
run: |
git push origin master --tags