Skip to content

Commit

Permalink
Workflow updated
Browse files Browse the repository at this point in the history
  • Loading branch information
Burzo committed Apr 1, 2024
1 parent 3540ba1 commit 5ca4caf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
8 changes: 4 additions & 4 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -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:"
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 5ca4caf

Please sign in to comment.