Skip to content

Commit

Permalink
Only publish a version per branch/tag
Browse files Browse the repository at this point in the history
  • Loading branch information
octylFractal committed Jul 30, 2024
1 parent a56bb07 commit d86b372
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
B2_APPLICATION_KEY_ID: ${{ secrets.B2_KEY_ID }}
B2_APPLICATION_KEY: ${{ secrets.B2_APPLICATION_KEY }}
B2_BUCKET_NAME: octy-enginehub
B2_PREFIX: ${{ github.ref_name == github.event.repository.default_branch && 'lin-bus-distributions' || format('lin-bus-distributions/{0}', github.ref_name) }}
B2_PREFIX: ${{ github.ref_type == 'tag' && 'lin-bus-distributions/@APP_VERSION@' || format('lin-bus-distributions/{0}', github.ref_name) }}
run: ./gradlew :gui:uploadDistributions -s

- name: "Kill Daemons Because Apparently GitHub Won't Do It For You"
Expand Down
4 changes: 3 additions & 1 deletion gui/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -127,5 +127,7 @@ tasks.register<B2Upload>("uploadDistributions") {
dependsOn(tasks.jpackage)
inputDir = tasks.jpackage.map { it.jpackageData.installerOutputDir }
bucketName = providers.environmentVariable("B2_BUCKET_NAME")
prefix = providers.environmentVariable("B2_PREFIX").map { "$it/$appVersionValue/$classifierValue" }
prefix = providers.environmentVariable("B2_PREFIX").map {
"${it.replace("@APP_VERSION@", appVersionValue)}/$classifierValue"
}
}

0 comments on commit d86b372

Please sign in to comment.