mirror of https://github.com/v2ray/v2ray-core
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
62 lines
1.7 KiB
62 lines
1.7 KiB
trigger: |
|
batch: true |
|
branches: |
|
include: |
|
- master |
|
- dev* |
|
- refs/tags/* |
|
|
|
pool: |
|
vmImage: 'ubuntu-latest' |
|
|
|
variables: |
|
- group: GithubToken |
|
- name: GOPATH |
|
value: '$(system.defaultWorkingDirectory)/gopath' |
|
- name: BAZEL_VER |
|
value: '3.5.0' |
|
|
|
steps: |
|
- checkout: self |
|
- task: GoTool@0 |
|
inputs: |
|
version: '1.15.2' |
|
- script: | |
|
go version |
|
mkdir -p $GOPATH/src/v2ray.com |
|
ln -s $(pwd) $GOPATH/src/v2ray.com/core |
|
ls -lah $GOPATH/src/v2ray.com/core |
|
cd $GOPATH/src/v2ray.com/core || exit 1 |
|
go mod download |
|
workingDirectory: '$(system.defaultWorkingDirectory)' |
|
displayName: 'Fetch sources' |
|
- script: | |
|
cd ./src/v2ray.com/core || exit 1 |
|
bazel build --action_env=GOPATH=$GOPATH --action_env=PATH=$PATH --action_env=SPWD=$PWD --action_env=GOCACHE=$(go env GOCACHE) --spawn_strategy local //release:all |
|
workingDirectory: '$(GOPATH)' |
|
displayName: 'Build Binaries' |
|
- script: | |
|
cd ./src/v2ray.com/core || exit 1 |
|
echo $RELEASE_TAG |
|
./release/bleedingrelease.sh |
|
workingDirectory: '$(GOPATH)' |
|
displayName: 'Generate Bleeding Edge Release' |
|
env: |
|
GITHUB_TOKEN: $(GITHUB_TOKEN) |
|
PRERELEASE: true |
|
RELEASE_TAG: unstable-$(Build.SourceVersion) |
|
RELEASE_SHA: $(Build.SourceVersion) |
|
TRIGGER_REASON: $(Build.SourceBranch) |
|
GITHUB_REPO_OWNER: v2fly |
|
GITHUB_REPO_NAME: v2ray-core |
|
- script: | |
|
cd ./src/v2ray.com/core || exit 1 |
|
echo $RELEASE_TAG |
|
./release/tagrelease.sh |
|
workingDirectory: '$(GOPATH)' |
|
displayName: 'Generate Tag Release' |
|
env: |
|
GITHUB_TOKEN: $(GITHUB_TOKEN) |
|
PRERELEASE: true |
|
RELEASE_TAG: unstable-$(Build.SourceVersion) |
|
TRIGGER_REASON: $(Build.SourceBranch)
|
|
|