14
14
OUTPUT_DIR : $GITHUB_WORKSPACE/build/outputs
15
15
OUTPUT_ZIP : b2-sdk-build-${GITHUB_RUN_NUMBER}.zip
16
16
BUILD_NUMBER : ${{ github.run_number }}
17
- # This token was generated under rhryckewicz account
18
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
19
17
# These are stored in Bitwarden
20
18
B2_ACCOUNT_ID : ${{ secrets.B2_ACCOUNT_ID }}
21
19
B2_UPLOAD_BUCKET : ${{ secrets.B2_UPLOAD_BUCKET }}
@@ -25,26 +23,26 @@ jobs:
25
23
build :
26
24
runs-on : ubuntu-latest
27
25
steps :
28
- - uses : actions/checkout@v2
26
+ - uses : actions/checkout@v4
29
27
with :
30
28
fetch-depth : 0
31
29
32
- - name : Use jdk8
33
- uses : actions/setup-java@v2
30
+ - uses : actions/setup-java@v4
34
31
with :
35
- distribution : ' adopt'
36
- java-version : ' 8'
37
- cache : ' gradle'
32
+ distribution : ' temurin'
33
+ java-version : ' 11'
34
+
35
+ - uses : gradle/actions/wrapper-validation@v4
36
+ - name : Setup Gradle
37
+ uses : gradle/actions/setup-gradle@v4
38
38
39
- - uses : gradle/wrapper-validation-action@v1
40
39
- name : Set up Python ${{ env.PYTHON_DEFAULT_VERSION }}
41
- uses : actions/setup-python@v2
40
+ uses : actions/setup-python@v5
42
41
with :
43
42
python-version : ${{ env.PYTHON_DEFAULT_VERSION }}
44
43
45
44
- name : Install dependencies
46
45
run : |
47
- mkdir -p ~/.gradle && echo "org.gradle.daemon=false" >> ~/.gradle/gradle.properties
48
46
# upgrade pip and setuptools so that b2 CLI can be properly installed
49
47
python -m pip install --upgrade pip setuptools
50
48
python -m pip install b2
@@ -66,18 +64,13 @@ jobs:
66
64
67
65
- name : Deploy to internal Maven repo
68
66
if : github.ref == 'refs/heads/master' && github.repository == 'Backblaze/b2-sdk-java-private'
69
- run : $GITHUB_WORKSPACE/gradlew publishMavenPublicationToBzGithubPackagesRepository
67
+ run : $GITHUB_WORKSPACE/gradlew publishMavenPublicationToBzArtifactoryRepository publishMavenPublicationToBzGithubPackagesRepository
70
68
env :
69
+ ORG_GRADLE_PROJECT_bzArtifactoryUsername : ${{ secrets.ARTIFACTORY_USERNAME }}
70
+ ORG_GRADLE_PROJECT_bzArtifactoryPassword : ${{ secrets.ARTIFACTORY_TOKEN }}
71
71
ORG_GRADLE_PROJECT_bzGithubPackagesUsername : ${{ secrets.PACKAGES_USERNAME }}
72
72
ORG_GRADLE_PROJECT_bzGithubPackagesPassword : ${{ secrets.PACKAGES_TOKEN }}
73
73
74
- - name : Cleanup Gradle Cache
75
- # Remove some files from the Gradle cache, so they aren't cached by GitHub Actions.
76
- # Restoring these files from a GitHub Actions cache might cause problems for future builds.
77
- run : |
78
- rm -f ~/.gradle/caches/modules-2/modules-2.lock
79
- rm -fr ~/.gradle/caches/*/plugin-resolution/
80
-
81
74
- name : Upload to b2
82
75
if : github.ref == 'refs/heads/master'
83
76
# upload to b2 (if credentials are provided, as they will be for backblaze's builds, but not pull requests)
@@ -86,16 +79,16 @@ jobs:
86
79
87
80
- name : Check GitHub Pages status
88
81
if : github.ref == 'refs/heads/master'
89
- uses : crazy-max/ghaction-github-status@v2
82
+ uses : crazy-max/ghaction-github-status@v4
90
83
with :
91
84
pages_threshold : major_outage
92
85
93
- - name : Deploy
86
+ - name : Deploy Javadoc
94
87
# note that i'm only uploading the javadocs for b2-sdk-core.
95
88
# that's because i'm lame and building separate javadocs for
96
89
# each jar and only uploading one set of javadocs.
97
90
if : github.ref == 'refs/heads/master' && success()
98
- uses : crazy-max/ghaction-github-pages@v2
91
+ uses : crazy-max/ghaction-github-pages@v3
99
92
with :
100
93
target_branch : gh-pages
101
94
build_dir : core/build/docs/javadoc
0 commit comments