You've already forked Tricky-Addon-Update-Target-List
mirror of
https://github.com/KOWX712/Tricky-Addon-Update-Target-List.git
synced 2025-09-06 06:37:09 +00:00
module name
This commit is contained in:
15
.github/workflows/build.yml
vendored
15
.github/workflows/build.yml
vendored
@@ -21,17 +21,20 @@ jobs:
|
|||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
fetch-depth: 2
|
fetch-depth: 0
|
||||||
fetch-tags: true
|
fetch-tags: true
|
||||||
|
|
||||||
- name: Extract Module Info
|
- name: Extract Module Info
|
||||||
id: extract_info
|
id: extract_info
|
||||||
run: |
|
run: |
|
||||||
MODULE_VERSION=$(grep -oP '^version=\K.*' module/module.prop)
|
MODULE_VERSION=$(grep '^version=' module/module.prop | sed 's/version=//')
|
||||||
BUILD_COUNT=$((1000 + ${{ github.run_number }}))
|
COMMIT_NUM=$(git rev-list --count HEAD)
|
||||||
ARTIFACT_NAME="TrickyAddonModule-${MODULE_VERSION}-canary-${BUILD_COUNT}"
|
BUILD_COUNT=${{ github.run_number }}
|
||||||
|
ARTIFACT_NAME="TrickyAddonModule-${MODULE_VERSION}-${COMMIT_NUM}${BUILD_COUNT}-canary"
|
||||||
|
sed -i "s/^version=.*/& (${COMMIT_NUM}${BUILD_COUNT}-canary)/" module/module.prop
|
||||||
echo "MODULE_VERSION=${MODULE_VERSION}" >> $GITHUB_ENV
|
echo "MODULE_VERSION=${MODULE_VERSION}" >> $GITHUB_ENV
|
||||||
echo "ARTIFACT_NAME=${ARTIFACT_NAME}" >> $GITHUB_ENV
|
echo "ARTIFACT_NAME=${ARTIFACT_NAME}" >> $GITHUB_ENV
|
||||||
|
echo "VERSION=${MODULE_VERSION}" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Upload Artifact
|
- name: Upload Artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
@@ -46,9 +49,9 @@ jobs:
|
|||||||
if [ "${{ github.event_name }}" = "pull_request" ]; then
|
if [ "${{ github.event_name }}" = "pull_request" ]; then
|
||||||
echo "version_tag_exists=true" >> $GITHUB_OUTPUT
|
echo "version_tag_exists=true" >> $GITHUB_OUTPUT
|
||||||
else
|
else
|
||||||
VERSION=$(grep '^version=' module/module.prop | sed 's/version=//')
|
|
||||||
git fetch --tags
|
git fetch --tags
|
||||||
if git tag | grep -qx "^$VERSION"; then
|
VERSION=${{ env.VERSION }}
|
||||||
|
if git tag | grep -qx "^${VERSION}"; then
|
||||||
echo "version_tag_exists=true" >> $GITHUB_OUTPUT
|
echo "version_tag_exists=true" >> $GITHUB_OUTPUT
|
||||||
else
|
else
|
||||||
echo "version_tag_exists=false" >> $GITHUB_OUTPUT
|
echo "version_tag_exists=false" >> $GITHUB_OUTPUT
|
||||||
|
|||||||
Reference in New Issue
Block a user