Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
xishang0128 committed Apr 18, 2024
1 parent 4f442b9 commit d401847
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,12 @@ jobs:
else
ARCH=${{matrix.jobs.goarch}}
fi
PackageVersion=$(curl -s "https://api.github.com/repos/MetaCubeX/mihomo/releases/latest" | grep -o '"tag_name": "[^"]*' | grep -o '[^"]*$')
if [ $(git branch | awk -F ' ' '{print $2}') = "Alpha" ]; then
PackageVersion=$(echo "PackageVersion" | sed 's/\(.*\)\.\(.*\)\.\(.*\)/\1.\2.$((\3 + 1))/e')
fi
mkdir -p mihomo-${{matrix.jobs.goos}}-${{matrix.jobs.output}}-${VERSION}/DEBIAN
mkdir -p mihomo-${{matrix.jobs.goos}}-${{matrix.jobs.output}}-${VERSION}/usr/bin
mkdir -p mihomo-${{matrix.jobs.goos}}-${{matrix.jobs.output}}-${VERSION}/etc/mihomo
Expand All @@ -194,7 +200,7 @@ jobs:
cat > mihomo-${{matrix.jobs.goos}}-${{matrix.jobs.output}}-${VERSION}/DEBIAN/control <<EOF
Package: mihomo
Version: 1.18.2-${VERSION}
Version: ${PackageVersion}-${VERSION}
Section:
Priority: extra
Architecture: ${ARCH}
Expand Down

0 comments on commit d401847

Please sign in to comment.