aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorFactiven <[email protected]>2023-08-04 15:05:48 +0700
committerGitHub <[email protected]>2023-08-04 15:05:48 +0700
commit29e723b5c1d2e953759e2735c3e68c8adee34491 (patch)
tree2adb11bcc8fd67a3a5c68a462f5109c30f524ebf /.github
parentUpdate v3.8.5 - Merged Beta to Main (#32) (diff)
downloadmoopa-29e723b5c1d2e953759e2735c3e68c8adee34491.tar.xz
moopa-29e723b5c1d2e953759e2735c3e68c8adee34491.zip
Update main.yml
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/main.yml34
1 files changed, 18 insertions, 16 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 878e5d2..57fbcc4 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -1,29 +1,31 @@
+name: Create Release on Version Update
+
on:
push:
- # Sequence of patterns matched against refs/tags
- tags:
- - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
-
-name: Create Release
+ branches:
+ - main
jobs:
- build:
- name: Create Release
+ create_release:
runs-on: ubuntu-latest
+
steps:
- - name: Checkout code
- uses: actions/checkout@v2
+ - name: Check commit message and version
+ id: check_version
+ run: |
+ commit_message=$(git log -1 --pretty=format:%s)
+ version=$(echo $commit_message | grep -o -E "v[0-9]+\.[0-9]+\.[0-9]+" || true)
+ echo "Version found in commit message: $version"
+ echo "::set-output name=version::$version"
+ shell: bash
+
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
- tag_name: ${{ github.ref }}
- release_name: Release ${{ github.ref }}
- body: |
- Changes in this Release
- - First Change
- - Second Change
+ tag_name: ${{ steps.check_version.outputs.version }}
+ release_name: Release ${{ steps.check_version.outputs.version }}
draft: false
prerelease: false