mirror of https://github.com/v2ray/v2ray-core
Redo Bleeding Edge Release
parent
64fd7c8ce8
commit
76a8ac8434
|
@ -35,6 +35,7 @@ jobs:
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
CODECOV_TOKEN: '$(coverage.token)'
|
CODECOV_TOKEN: '$(coverage.token)'
|
||||||
|
- group: GithubToken
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- checkout: self
|
- checkout: self
|
||||||
|
@ -104,15 +105,11 @@ jobs:
|
||||||
cp ./src/v2ray.com/core/bazel-bin/release/*.zip ./release/
|
cp ./src/v2ray.com/core/bazel-bin/release/*.zip ./release/
|
||||||
workingDirectory: '$(GOPATH)'
|
workingDirectory: '$(GOPATH)'
|
||||||
displayName: 'Dump Binaries'
|
displayName: 'Dump Binaries'
|
||||||
|
- script: |
|
||||||
- task: GitHubRelease@0
|
./release/bleedingrelease.sh
|
||||||
inputs:
|
workingDirectory: '$(GOPATH)'
|
||||||
gitHubConnection: v2flybleedingedge
|
displayName: 'Generate Bleeding Edge Release'
|
||||||
repositoryName: v2fly/v2ray-core
|
env:
|
||||||
tagSource: 'manual'
|
GITHUB_TOKEN: $(GITHUB_TOKEN)
|
||||||
tag: '$(Build.SourceVersion)'
|
PRERELEASE: true
|
||||||
assets: '$(GOPATH)/release/*'
|
RELEASE_TAG: $(Build.SourceVersion)
|
||||||
isPreRelease: true
|
|
||||||
releaseNotesSource: 'input'
|
|
||||||
releaseNotes: 'Do not use this release unless you understand what you are doing.'
|
|
||||||
displayName: 'Generate Github Bleeding Edge Release'
|
|
||||||
|
|
|
@ -0,0 +1,50 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
|
||||||
|
RELBODY="https://www.v2ray.com/chapter_00/01_versions.html"
|
||||||
|
JSON_DATA=$(echo "{}" | jq -c ".tag_name=\"${RELEASE_TAG}\"")
|
||||||
|
JSON_DATA=$(echo ${JSON_DATA} | jq -c ".prerelease=${PRERELEASE}")
|
||||||
|
JSON_DATA=$(echo ${JSON_DATA} | jq -c ".body=\"${RELBODY}\"")
|
||||||
|
RELEASE_ID=$(curl --data "${JSON_DATA}" -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/v2fly/V2FlyBleedingEdgeBinary/releases | jq ".id")
|
||||||
|
|
||||||
|
function uploadfile() {
|
||||||
|
FILE=$1
|
||||||
|
CTYPE=$(file -b --mime-type $FILE)
|
||||||
|
|
||||||
|
sleep 1
|
||||||
|
curl -H "Authorization: token ${GITHUB_TOKEN}" -H "Content-Type: ${CTYPE}" --data-binary @$FILE "https://uploads.github.com/repos/v2fly/V2FlyBleedingEdgeBinary/releases/${RELEASE_ID}/assets?name=$(basename $FILE)"
|
||||||
|
sleep 1
|
||||||
|
}
|
||||||
|
|
||||||
|
function upload() {
|
||||||
|
FILE=$1
|
||||||
|
DGST=$1.dgst
|
||||||
|
openssl dgst -md5 $FILE | sed 's/([^)]*)//g' >> $DGST
|
||||||
|
openssl dgst -sha1 $FILE | sed 's/([^)]*)//g' >> $DGST
|
||||||
|
openssl dgst -sha256 $FILE | sed 's/([^)]*)//g' >> $DGST
|
||||||
|
openssl dgst -sha512 $FILE | sed 's/([^)]*)//g' >> $DGST
|
||||||
|
uploadfile $FILE
|
||||||
|
uploadfile $DGST
|
||||||
|
}
|
||||||
|
|
||||||
|
ART_ROOT=$GOPATH/src/v2ray.com/core/bazel-bin/release
|
||||||
|
|
||||||
|
upload ${ART_ROOT}/v2ray-macos.zip
|
||||||
|
upload ${ART_ROOT}/v2ray-windows-64.zip
|
||||||
|
upload ${ART_ROOT}/v2ray-windows-32.zip
|
||||||
|
upload ${ART_ROOT}/v2ray-linux-64.zip
|
||||||
|
upload ${ART_ROOT}/v2ray-linux-32.zip
|
||||||
|
upload ${ART_ROOT}/v2ray-linux-arm.zip
|
||||||
|
upload ${ART_ROOT}/v2ray-linux-arm64.zip
|
||||||
|
upload ${ART_ROOT}/v2ray-linux-mips64.zip
|
||||||
|
upload ${ART_ROOT}/v2ray-linux-mips64le.zip
|
||||||
|
upload ${ART_ROOT}/v2ray-linux-mips.zip
|
||||||
|
upload ${ART_ROOT}/v2ray-linux-mipsle.zip
|
||||||
|
upload ${ART_ROOT}/v2ray-linux-ppc64.zip
|
||||||
|
upload ${ART_ROOT}/v2ray-linux-ppc64le.zip
|
||||||
|
upload ${ART_ROOT}/v2ray-linux-s390x.zip
|
||||||
|
upload ${ART_ROOT}/v2ray-freebsd-64.zip
|
||||||
|
upload ${ART_ROOT}/v2ray-freebsd-32.zip
|
||||||
|
upload ${ART_ROOT}/v2ray-openbsd-64.zip
|
||||||
|
upload ${ART_ROOT}/v2ray-openbsd-32.zip
|
||||||
|
upload ${ART_ROOT}/v2ray-dragonfly-64.zip
|
Loading…
Reference in New Issue