Skip to content

Commit 4cd8348

Browse files
authored
Merge pull request #175 from TileDB-Inc/victorgiannakouris/github_release_azure_pipelines
Setup GitHub Release at Azure Pipelines
2 parents 34178cc + e8162e0 commit 4cd8348

File tree

2 files changed

+63
-7
lines changed

2 files changed

+63
-7
lines changed

azure-pipelines.yml

Lines changed: 61 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,67 @@ stages:
7070
steps:
7171
- template: ci/tiledb-java-windows-release.yml
7272

73-
- stage: Release
74-
condition: or(startsWith(variables['Build.SourceBranch'], 'refs/tags'), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
73+
- stage: GitHubRelease
74+
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags')
75+
jobs:
76+
- job: All_OS
77+
strategy:
78+
matrix:
79+
ubuntu_18:
80+
imageName: 'ubuntu-18.04'
81+
pool:
82+
vmImage: $(imageName)
83+
84+
steps:
85+
- download: current
86+
patterns: '**/*.tar.gz'
87+
88+
- bash: |
89+
unset SYSTEM
90+
set +e
91+
92+
mv ../libraries/* .
93+
94+
mkdir -p ./build/install/lib
95+
mkdir ./build/install/lib64
96+
mkdir ./build/tiledb_jni/
97+
mkdir ./build/tiledb_jni/Release
98+
mkdir ./build/install/bin
99+
100+
for arch in $(ls | grep .tar.gz)
101+
do
102+
tar -xf $arch
103+
done
104+
105+
# OSX
106+
mv libtiledb.dylib ./build/install/lib
107+
mv libtiledbjni.dylib ./build/tiledb_jni
108+
109+
# Linux
110+
cp libtiledb.so ./build/install/lib
111+
mv libtiledb.so ./build/install/lib64
112+
mv libtiledbjni.so ./build/tiledb_jni
113+
114+
# Windows
115+
mv tbb.dll ./build/install/bin
116+
mv tiledb.dll ./build/install/bin
117+
mv tiledbjni.dll ./build/tiledb_jni/Release
118+
119+
./gradlew assemble
120+
121+
cp build/libs/*.jar $BUILD_BINARIESDIRECTORY
122+
123+
- task: GithubRelease@0
124+
displayName: 'GitHub Release'
125+
inputs:
126+
gitHubConnection: github_tiledb
127+
repositoryName: TileDB-Inc/TileDB-Java
128+
tag: $(Build.SourceBranchName)
129+
action: "edit"
130+
assets: $(Build.BinariesDirectory)/jars/*.jar
131+
132+
- stage: FinalJar
133+
condition: or( eq(variables['Build.SourceBranch'], 'refs/heads/master'), startsWith(variables['Build.SourceBranch'], 'refs/tags'))
75134
jobs:
76135
- job: All_OS
77136
strategy:

ci/tiledb-java-final-jar.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ steps:
3535
3636
./gradlew assemble
3737
38-
PROJECT_VERSION=$(./gradlew properties -q | grep "version:" | awk '{print $2}')
39-
4038
cp build/libs/*.jar $BUILD_BINARIESDIRECTORY
4139
4240
displayName: 'Building the Fat Jar'
@@ -61,14 +59,13 @@ steps:
6159
artifactName: final-jar
6260
condition: succeeded()
6361

62+
6463
- bash: |
65-
echo "USERNAME"
66-
echo $SONATYPE_USERNAME
6764
./ci/upload_to_maven.sh
6865
env:
6966
GPG_KEY_ID: $(GPG_KEY_ID)
7067
GPG_PASSPHRASE: $(GPG_PASSPHRASE)
7168
GPG_SECRET_KEYS_ENC: $(GPG_SECRET_KEYS_ENC)
7269
SONATYPE_USERNAME: $(SONATYPE_USERNAME)
7370
SONATYPE_PASSWORD: $(SONATYPE_PASSWORD)
74-
displayName: "Publish"
71+
displayName: "Publish to Maven"

0 commit comments

Comments
 (0)