Create Release v0.10 #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |