Add trigger on pull request

This commit is contained in:
KOWX712
2024-12-26 01:19:03 +08:00
parent b07c9f8f5a
commit 10c02a6924

View File

@@ -6,6 +6,9 @@ on:
- main
paths:
- 'module/**'
pull_request:
paths:
- 'module/**'
workflow_dispatch:
jobs:
@@ -40,6 +43,9 @@ jobs:
- name: Check if valid to release
id: check_tag
run: |
if [ "${{ github.event_name }}" = "pull_request" ]; then
echo "version_tag_exists=true" >> $GITHUB_OUTPUT
else
VERSION=$(grep '^version=' module/module.prop | sed 's/version=//')
git fetch --tags
if git tag | grep -qx "^$VERSION"; then
@@ -47,6 +53,7 @@ jobs:
else
echo "version_tag_exists=false" >> $GITHUB_OUTPUT
fi
fi
release:
name: release