Skip to content

Commit 07f41dd

Browse files
Configure github actions to allow releasing from a feature branch (#95)
1 parent 897f028 commit 07f41dd

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/.ci_cd.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ on:
88
pull_request:
99
branches:
1010
- master
11+
- api-v2
12+
- 7.x # TODO: This is temporary and will be removed once we merge this branch to master branch
1113

1214
env:
1315
PYTHON_DEFAULT_VERSION: 3.8
@@ -63,7 +65,7 @@ jobs:
6365
zip -r $GITHUB_WORKSPACE/build/${{ env.OUTPUT_ZIP }} *
6466
6567
- name: Deploy to internal Maven repo
66-
if: github.ref == 'refs/heads/master' && github.repository == 'Backblaze/b2-sdk-java-private'
68+
if: (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/api-v2' || github.ref == 'refs/heads/7.x') && github.repository == 'Backblaze/b2-sdk-java-private'
6769
run: $GITHUB_WORKSPACE/gradlew publishMavenPublicationToBzArtifactoryRepository publishMavenPublicationToBzGithubPackagesRepository
6870
env:
6971
ORG_GRADLE_PROJECT_bzArtifactoryUsername: ${{ secrets.ARTIFACTORY_USERNAME }}
@@ -72,7 +74,7 @@ jobs:
7274
ORG_GRADLE_PROJECT_bzGithubPackagesPassword: ${{ secrets.PACKAGES_TOKEN }}
7375

7476
- name: Upload to b2
75-
if: github.ref == 'refs/heads/master'
77+
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/api-v2' || github.ref == 'refs/heads/7.x'
7678
# upload to b2 (if credentials are provided, as they will be for backblaze's builds, but not pull requests)
7779
# This should be using python 3.4
7880
run: $GITHUB_WORKSPACE/maybe_upload_build_results ${{ env.OUTPUT_ZIP }}
@@ -87,7 +89,7 @@ jobs:
8789
# note that i'm only uploading the javadocs for b2-sdk-core.
8890
# that's because i'm lame and building separate javadocs for
8991
# each jar and only uploading one set of javadocs.
90-
if: github.ref == 'refs/heads/master' && success()
92+
if: (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/api-v2' || github.ref == 'refs/heads/7.x') && success()
9193
uses: crazy-max/ghaction-github-pages@v3
9294
with:
9395
target_branch: gh-pages

0 commit comments

Comments
 (0)