30
30
build_android :
31
31
runs-on : ubuntu-latest
32
32
permissions :
33
- contents : ' read ' # Allows workflow to checkout repository code
33
+ contents : ' write ' # Allows workflow to checkout repository code
34
34
id-token : ' write' # Required for Google Cloud Workload Identity Federation authentication (OIDC token generation)
35
35
36
36
steps :
67
67
run : |
68
68
git config user.name "GitHub Actions"
69
69
git config user.email "[email protected] "
70
- git add .
70
+ git add .version package.json android/app/build.gradle ios/**/Info.plist
71
71
git commit -m "Bump version to $(cat .version)"
72
72
git push
73
+ git tag "v$(cat .version)"
74
+ git push origin "v$(cat .version)"
73
75
74
76
# Step 7: Set up Android Keystore
75
77
- name : Set up Android Keystore
@@ -94,25 +96,31 @@ jobs:
94
96
run : bundle exec fastlane release_android_alpha
95
97
96
98
# Step 10: Upload the entire project directory for use in the iOS job
97
- - name : Upload code for iOS build
98
- uses : actions/upload-artifact@v3
99
- with :
100
- name : source-code
101
- path : .
102
- retention-days : 1
99
+ # - name: Upload code for iOS build
100
+ # uses: actions/upload-artifact@v3
101
+ # with:
102
+ # name: source-code
103
+ # path: .
104
+ # retention-days: 1
103
105
104
106
# Job 2: iOS Build and Upload (runs on macOS)
105
107
build_ios :
106
108
runs-on : macos-latest
107
109
needs : build_android
108
110
109
111
steps :
110
- # Step 1: Download code from previous job
111
- - name : Download code
112
- uses : actions/download-artifact@v3
112
+ - name : Checkout code # Replace the Download code step
113
+ uses : actions/checkout@v3
113
114
with :
114
- name : source-code
115
- path : .
115
+ ref : ${{ github.ref }} # This ensures we get the latest changes including the version bump
116
+
117
+ # steps:
118
+ # # Step 1: Download code from previous job
119
+ # - name: Download code
120
+ # uses: actions/download-artifact@v3
121
+ # with:
122
+ # name: source-code
123
+ # path: .
116
124
117
125
# Step 2: Set up Node.js
118
126
- name : Set up Node.js
0 commit comments