forked from Doubi88/SlideshowWallpaper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbitbucket-pipelines.yml
58 lines (56 loc) · 2.8 KB
/
bitbucket-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Slideshow Wallpaper: An Android live wallpaper displaying custom images.
# Copyright (C) 2022 Doubi88 <tobis_mail@yahoo.de>
#
# Slideshow Wallpaper is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Slideshow Wallpaper is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
image: mobiledevops/android-sdk-image
pipelines:
branches:
development:
- step:
name: Build Debug Application
caches:
- gradle
script:
- ./gradlew assembleDebug
- ./gradlew bundleDebug
artifacts:
- app/build/outputs/**
- step:
name: upload
deployment: test
script:
- curl -v -X POST "https://${BB_AUTH_STRING}@api.bitbucket.org/2.0/repositories/${BITBUCKET_REPO_OWNER}/${BITBUCKET_REPO_SLUG}/downloads" --form files=@"app/build/outputs/apk/debug/app-debug.apk"
- curl -v -X POST "https://${BB_AUTH_STRING}@api.bitbucket.org/2.0/repositories/${BITBUCKET_REPO_OWNER}/${BITBUCKET_REPO_SLUG}/downloads" --form files=@"app/build/outputs/bundle/debug/app-debug.aab"
master:
- step:
name: Build Prod Application
caches:
- gradle
script:
- mkdir app/Keystore
- echo $KEYSTORE_ENCRYPTED | tr '|' '\n' > app/Keystore/SlideshowWallpaper.jks.asc
- echo $CREDENTIALS_ENCRYPTED | tr '|' '\n' > app/Keystore/keystore.properties.asc
- gpg -d --passphrase $GPG_PASSPHRASE --batch app/Keystore/keystore.properties.asc > app/Keystore/keystore.properties
- gpg -d --passphrase $GPG_PASSPHRASE --batch app/Keystore/SlideshowWallpaper.jks.asc > app/Keystore/SlideshowWallpaper.jks
- ./gradlew assembleRelease
- ./gradlew bundleRelease
artifacts:
- app/build/outputs/**
- step:
name: upload
deployment: production
script:
- curl -v -X POST "https://${BB_AUTH_STRING}@api.bitbucket.org/2.0/repositories/${BITBUCKET_REPO_OWNER}/${BITBUCKET_REPO_SLUG}/downloads" --form files=@"app/build/outputs/apk/release/app-release.apk"
- curl -v -X POST "https://${BB_AUTH_STRING}@api.bitbucket.org/2.0/repositories/${BITBUCKET_REPO_OWNER}/${BITBUCKET_REPO_SLUG}/downloads" --form files=@"app/build/outputs/bundle/release/app-release.aab"