mirror of
https://github.com/MetaCubeX/ClashMetaForAndroid.git
synced 2024-11-25 14:56:09 +03:00
Update workflows
This commit is contained in:
parent
57504a7e8e
commit
81e6e2578f
14
.github/workflows/build-release.yaml
vendored
14
.github/workflows/build-release.yaml
vendored
@ -62,8 +62,8 @@ jobs:
|
|||||||
newVersionCode=$((versionCode + 1))
|
newVersionCode=$((versionCode + 1))
|
||||||
sed -i "s/versionCode = $versionCode/versionCode = $newVersionCode/" build.gradle.kts
|
sed -i "s/versionCode = $versionCode/versionCode = $newVersionCode/" build.gradle.kts
|
||||||
sed -i "s/versionName = \"$versionName\"/versionName = \"$newVersionName\"/" build.gradle.kts
|
sed -i "s/versionName = \"$versionName\"/versionName = \"$newVersionName\"/" build.gradle.kts
|
||||||
echo "::set-output name=newVersionName::$newVersionName"
|
echo "newVersionName=$newVersionName" >> $GITHUB_OUTPUT
|
||||||
echo "::set-output name=newVersionCode::$newVersionCode"
|
echo "newVersionCode=$newVersionCode" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Commit modified version code and make new tag
|
- name: Commit modified version code and make new tag
|
||||||
if: ${{ inputs.auto-bump-version }}
|
if: ${{ inputs.auto-bump-version }}
|
||||||
@ -99,25 +99,23 @@ jobs:
|
|||||||
id: real_tag
|
id: real_tag
|
||||||
run: |
|
run: |
|
||||||
if [[ "${{ inputs.auto-bump-version }}" == "true" ]]; then
|
if [[ "${{ inputs.auto-bump-version }}" == "true" ]]; then
|
||||||
echo "::set-output name=tag::v${{ steps.bump-version.outputs.newVersionName }}"
|
echo "tag=v${{ steps.bump-version.outputs.newVersionName }}" >> $GITHUB_OUTPUT
|
||||||
else
|
else
|
||||||
echo "::set-output name=tag::$(git describe --tags --abbrev=0)
|
echo "tag=$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Tag Repo
|
- name: Tag Repo
|
||||||
uses: richardsimko/update-tag@v1
|
uses: richardsimko/update-tag@v1
|
||||||
with:
|
with:
|
||||||
tag: ${{ steps.real_tag.outputs.tag }}
|
|
||||||
tag_name: ${{ steps.real_tag.outputs.tag }}
|
tag_name: ${{ steps.real_tag.outputs.tag }}
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.DEFAULT_TOKEN }}
|
||||||
|
|
||||||
- name: Upload Release
|
- name: Upload Release
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
if: ${{ success() }}
|
if: ${{ success() }}
|
||||||
with:
|
with:
|
||||||
tag: ${{ github.ref_name }}
|
tag_name: ${{ steps.real_tag.outputs.tag }}
|
||||||
tag_name: ${{ github.ref_name }}
|
|
||||||
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