File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed
Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -199,19 +199,12 @@ jobs:
199199 if [ -n "${{ github.event.inputs.version }}" ]; then
200200 echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV
201201 fi
202- echo $VERSION
203-
204- - name : Set Time Variable
205- run : |
206202 echo "BUILDTIME=$(date)" >> $GITHUB_ENV
207203 echo "CGO_ENABLED=0" >> $GITHUB_ENV
208204 echo "BUILDTAG=-extldflags --static" >> $GITHUB_ENV
209205 echo "GOTOOLCHAIN=local" >> $GITHUB_ENV
210-
211- - name : Set PackageVersion
212- run : |
213- PackageVersion=$(curl -s "https://api.github.com/repos/MetaCubeX/mihomo/releases/latest" | grep -o '"tag_name": "[^"]*' | grep -o '[^"]*$' | sed 's/v//g' )
214- if [ $(git branch | awk -F ' ' '{print $2}') = "Alpha" ]; then
206+ PackageVersion=$(curl -s "https://api.github.com/repos/MetaCubeX/mihomo/releases/latest" | jq -r '.tag_name' | sed 's/v//g')
207+ if [ "${GITHUB_REF_NAME,,}" = "alpha" ]; then
215208 PackageVersion="$(echo "${PackageVersion}" | awk -F '.' '{$NF = $NF + 1; print}' OFS='.').${VERSION/-/.}"
216209 fi
217210 echo "PackageVersion=${PackageVersion}" >> $GITHUB_ENV
You can’t perform that action at this time.
0 commit comments