44 workflow_dispatch :
55 inputs :
66 release-tag :
7- description : ' Release Tag (v2.x.x)'
7+ description : " Release Tag (v2.x.x)"
88 required : true
99
1010jobs :
1515 uses : actions/checkout@v4
1616 with :
1717 fetch-depth : 0
18-
18+
1919 - name : Checkout submodules
2020 run : git submodule update --init --recursive --force
2121
@@ -41,26 +41,26 @@ jobs:
4141 key : ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
4242 restore-keys : |
4343 ${{ runner.os }}-go-
44-
44+
4545 - name : Convert and set version env
4646 id : process-version
4747 run : |
4848 VERSION_TAG=${{ inputs.release-tag }}
4949 VERSION_TAG=${VERSION_TAG#v} # remove the 'v' prefix
5050 IFS='.' read -ra VERSION_PARTS <<< "$VERSION_TAG" # split into array
5151 VERSION_CODE=$(printf "%1d%02d%03d" "${VERSION_PARTS[0]}" "${VERSION_PARTS[1]}" "${VERSION_PARTS[2]}")
52-
52+
5353 echo "versonName=$VERSION_TAG" >> $GITHUB_OUTPUT # "1.2.3"
5454 echo "versonCode=$VERSION_CODE" >> $GITHUB_OUTPUT # "102003"
55-
55+
5656 # Re-write version in build.gradle.kts
5757 - name : Re-write version
5858 uses : Devofure/advance-android-version-actions@v1.5
5959 with :
6060 gradlePath : build.gradle.kts
6161 versionCode : ${{ steps.process-version.outputs.versonCode }}
6262 versionName : ${{ steps.process-version.outputs.versonName }}
63-
63+
6464 # If any change found, commit it and push
6565 - name : Commit and push if changes
6666 run : |
8383 sudo update-ca-certificates
8484 cp -f /etc/ssl/certs/ca-certificates.crt core/src/foss/golang/clash/component/ca/ca-certificates.crt
8585
86+ - name : Local Properties
87+ env :
88+ CUSTOM_APPLICATION_ID : ${{ secrets.CUSTOM_APPLICATION_ID }}
89+ REMOVE_SUFFIX : ${{ secrets.REMOVE_SUFFIX }}
90+ run : |
91+ touch local.properties
92+ echo custom.application.id="$CUSTOM_APPLICATION_ID" >> local.properties
93+ echo remove.suffix="$REMOVE_SUFFIX" >> local.properties
94+
95+ echo "cat local.properties"
96+ cat local.properties
97+
8698 - name : Signing properties
8799 env :
88100 SIGNING_STORE_PASSWORD : ${{ secrets.SIGNING_STORE_PASSWORD }}
@@ -124,4 +136,4 @@ jobs:
124136 "ignore_labels": [
125137 "Update"
126138 ],
127- }
139+ }
0 commit comments