diff --git a/.github/workflows/build_release.yml b/.github/workflows/build_release.yml index 965e275c24..d785461be2 100644 --- a/.github/workflows/build_release.yml +++ b/.github/workflows/build_release.yml @@ -3,7 +3,7 @@ name: build_release on: workflow_call: # for beta releases from main - release.yml / dispatch_beta_release inputs: - needs_trapeze_artifacts: + is_main_build: type: boolean required: true push: @@ -12,7 +12,7 @@ on: - "test-[0-9]+.[0-9]+.[0-9]+" env: - ARTIFACT_LABEL: ${{ github.ref == 'refs/heads/main' && github.sha || github.ref_name }} + ARTIFACT_LABEL: ${{ inputs.is_main_build && github.sha || github.ref_name }} jobs: build_web: @@ -47,13 +47,13 @@ jobs: - name: Compress artifacts run: | - zip -r Voyager-Web-${ARTIFACT_LABEL}.zip dist + zip -r Voyager-Web-$ARTIFACT_LABEL.zip dist - name: Upload artifacts uses: actions/upload-artifact@v4 with: - name: Voyager-Web-${ARTIFACT_LABEL}.zip - path: Voyager-Web-${ARTIFACT_LABEL}.zip + name: Voyager-Web-${{ env.ARTIFACT_LABEL }}.zip + path: Voyager-Web-${{ env.ARTIFACT_LABEL }}.zip build_ios: environment: deploy @@ -65,7 +65,7 @@ jobs: - uses: actions/checkout@v4 - name: Download bumped version artifacts - if: inputs.needs_trapeze_artifacts + if: inputs.is_main_build uses: actions/download-artifact@v4 with: name: trapeze-artifacts @@ -111,8 +111,8 @@ jobs: - name: Upload iOS IPA as artifact uses: actions/upload-artifact@v4 with: - name: Voyager-iOS-${ARTIFACT_LABEL}.ipa - path: Voyager-iOS-${ARTIFACT_LABEL}.ipa + name: Voyager-iOS-${{ env.ARTIFACT_LABEL }}.ipa + path: Voyager-iOS-${{ env.ARTIFACT_LABEL }}.ipa build_android: runs-on: ubuntu-latest @@ -120,7 +120,7 @@ jobs: - uses: actions/checkout@v4 - name: Download bumped version artifacts - if: inputs.needs_trapeze_artifacts + if: inputs.is_main_build uses: actions/download-artifact@v4 with: name: trapeze-artifacts @@ -154,13 +154,13 @@ jobs: ANDROID_KEYSTORE: ${{ secrets.ANDROID_KEYSTORE }} ANDROID_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }} - - run: mv android/app/build/outputs/apk/release/app-release.apk Voyager-Android-${{ github.ref_name }}.apk + - run: mv android/app/build/outputs/apk/release/app-release.apk Voyager-Android-${{ env.ARTIFACT_LABEL }}.apk - name: Send to Artifacts uses: actions/upload-artifact@v4 with: - name: Voyager-Android-${ARTIFACT_LABEL}.apk - path: Voyager-Android-${ARTIFACT_LABEL}.apk + name: Voyager-Android-${{ env.ARTIFACT_LABEL }}.apk + path: Voyager-Android-${{ env.ARTIFACT_LABEL }}.apk build_android_play: environment: deploy @@ -172,7 +172,7 @@ jobs: - uses: actions/checkout@v4 - name: Download bumped version artifacts - if: inputs.needs_trapeze_artifacts + if: inputs.is_main_build uses: actions/download-artifact@v4 with: name: trapeze-artifacts diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f5f3c2403d..68d3f45da9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -88,7 +88,8 @@ jobs: needs: bump_src uses: ./.github/workflows/build_release.yml with: - needs_trapeze_artifacts: true + is_main_build: true + secrets: inherit permissions: contents: write # needed for create_release, even though it won't be called diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 0f907c5188..4ada3ce67c 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -17,7 +17,7 @@ default_platform(:ios) ENV['app_identifier'] = 'app.vger.voyager' ENV['app_name_sanitized'] = 'App' -ENV['ios_output'] = "Voyager-iOS-#{ENV['GITHUB_REF_NAME']}.ipa" +ENV['ios_output'] = "Voyager-iOS-#{ENV['ARTIFACT_LABEL']}.ipa" platform :ios do before_all do