diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index b972c10..ba58241 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -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" diff --git a/gui/build.gradle.kts b/gui/build.gradle.kts index 4a3eb20..cc8b6d9 100644 --- a/gui/build.gradle.kts +++ b/gui/build.gradle.kts @@ -127,5 +127,7 @@ tasks.register("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" + } }