mirror of
https://github.com/MetaCubeX/ClashMetaForAndroid.git
synced 2024-11-16 14:32:17 +08:00
action: fix release tag
This commit is contained in:
parent
dc80d751cb
commit
a08a0c1dd1
10
.github/workflows/build-release.yaml
vendored
10
.github/workflows/build-release.yaml
vendored
|
@ -43,12 +43,12 @@ jobs:
|
||||||
id: process-version
|
id: process-version
|
||||||
run: |
|
run: |
|
||||||
VERSION_TAG=${{ inputs.release-tag }}
|
VERSION_TAG=${{ inputs.release-tag }}
|
||||||
VERSION_TAG=${VERSION_TAG#v} # remove the 'v' prefix
|
VERSION_TAG=${VERSION_TAG#v} # remove the 'v' prefix
|
||||||
IFS='.' read -ra VERSION_PARTS <<< "$VERSION_TAG" # split into array
|
IFS='.' read -ra VERSION_PARTS <<< "$VERSION_TAG" # split into array
|
||||||
VERSION_CODE=$(printf "%1d%02d%03d" "${VERSION_PARTS[0]}" "${VERSION_PARTS[1]}" "${VERSION_PARTS[2]}")
|
VERSION_CODE=$(printf "%1d%02d%03d" "${VERSION_PARTS[0]}" "${VERSION_PARTS[1]}" "${VERSION_PARTS[2]}")
|
||||||
|
|
||||||
echo "versonName=${{ inputs.release-tag }}" >> $GITHUB_OUTPUT
|
echo "versonName=$VERSION_TAG" >> $GITHUB_OUTPUT # "1.2.3"
|
||||||
echo "versonCode=$VERSION_CODE" >> $GITHUB_OUTPUT
|
echo "versonCode=$VERSION_CODE" >> $GITHUB_OUTPUT # "102003"
|
||||||
|
|
||||||
# Re-write version in build.gradle.kts
|
# Re-write version in build.gradle.kts
|
||||||
- name: Re-write version
|
- name: Re-write version
|
||||||
|
@ -97,7 +97,7 @@ jobs:
|
||||||
- name: Tag Repo
|
- name: Tag Repo
|
||||||
uses: richardsimko/update-tag@v1
|
uses: richardsimko/update-tag@v1
|
||||||
with:
|
with:
|
||||||
tag_name: ${{ steps.process-version.outputs.versonName }}
|
tag_name: ${{ inputs.release-tag }}
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
@ -105,7 +105,7 @@ jobs:
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
if: ${{ success() }}
|
if: ${{ success() }}
|
||||||
with:
|
with:
|
||||||
tag_name: ${{ steps.process-version.outputs.versonName }}
|
tag_name: ${{ inputs.release-tag }}
|
||||||
files: app/build/outputs/apk/meta/release/*
|
files: app/build/outputs/apk/meta/release/*
|
||||||
generate_release_notes: true
|
generate_release_notes: true
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user