From 5ca4caf095e7c12c84b20bd255a596e643edb127 Mon Sep 17 00:00:00 2001 From: Miha Drofenik Date: Mon, 1 Apr 2024 20:36:37 +0200 Subject: [PATCH] Workflow updated --- .github/workflows/build.yml | 12 +++++------- fastlane/Fastfile | 8 ++++---- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a283f86..d0f1860 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,7 +23,7 @@ jobs: echo "Processed version: $VERSION" echo "::set-output name=version::$VERSION" - RELEASE_NOTES=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/repos/${{ github.repository }}/releases/tags/v0.0.20" | jq -r '.body') + RELEASE_NOTES=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/repos/${{ github.repository }}/releases/tags/v0.0.20" | jq -r '.body_text') echo "Release notes: $RELEASE_NOTES" echo "::set-output name=release_notes::$RELEASE_NOTES" ios-build: @@ -32,9 +32,6 @@ jobs: name: iOS development build runs-on: macos-latest steps: - - name: Add release notes - run: | - echo -n "${{ needs.extract-version.outputs.release_notes }}" > ./fastlane/release_notes.txt - name: Cancel previous runs uses: styfle/cancel-workflow-action@0.12.0 - name: Checkout repo from dev branch @@ -46,6 +43,8 @@ jobs: name: "wildlife-watcher-service-account.json" json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_JSON }} dir: "./fastlane" + - name: Add release notes + run: echo -n "${{ needs.extract-version.outputs.release_notes }}" > ./release_notes.txt - name: Copy App Store Provisioning certificate run: echo -n "${{ secrets.IOS_CERT_PROVISION }}" | base64 --decode > ./fastlane/profile.mobileprovision - name: Copy Testers Provisioning certificate @@ -78,9 +77,6 @@ jobs: container: image: reactnativecommunity/react-native-android steps: - - name: Add release notes - run: | - echo -n "${{ needs.extract-version.outputs.release_notes }}" > ./fastlane/release_notes.txt - name: Cancel previous runs uses: styfle/cancel-workflow-action@0.12.0 - name: Checkout repo from dev branch @@ -92,6 +88,8 @@ jobs: name: "wildlife-watcher-service-account.json" json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_JSON }} dir: "./fastlane" + - name: Add release notes + run: echo -n "${{ needs.extract-version.outputs.release_notes }}" > ./release_notes.txt - name: create-json id: add-android-credentials uses: jsdaniell/create-json@v1.2.2 diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 0527cc9..5913845 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -20,9 +20,9 @@ platform :ios do lane :build_release do # Check if the release_notes.txt file exists - if File.exist?("./fastlane/release_notes.txt") + if File.exist?("./release_notes.txt") # Read the contents of the file - release_notes_content = File.read("./fastlane/release_notes.txt") + release_notes_content = File.read("./release_notes.txt") # Print the contents of the file puts "Release Notes:" @@ -78,7 +78,7 @@ platform :ios do app: ENV["APP_ID"], service_credentials_file: "./fastlane/wildlife-watcher-service-account.json", testers: ENV['TESTERS'], - release_notes_file: './fastlane/release_notes.txt' + release_notes_file: './release_notes.txt' ) build_ios_app( @@ -119,7 +119,7 @@ platform :android do android_artifact_path: "./android/app/build/outputs/apk/release/app-release.apk", service_credentials_file: "./fastlane/wildlife-watcher-service-account.json", testers: ENV['TESTERS'], - release_notes_file: './fastlane/release_notes.txt' + release_notes_file: './release_notes.txt' ) # Will add once the app is uploaded