@@ -265,6 +265,55 @@ jobs:
265265 echo "📖 Dart docs"
266266 echo "http://${{ env.GCP_PR_BUCKET_ID }}.storage.googleapis.com/gha/${{ github.sha }}/dartdoc/index.html"
267267
268+ kotlin-docs :
269+ name : " Kotlin docs"
270+ needs : credentials
271+ runs-on : " ubuntu-latest"
272+ steps :
273+ - uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
274+
275+ # GCP Boilerplate for jobs in main or forked repository (needs credentials)
276+ - id : gcp-auth
277+ if : github.ref != 'refs/heads/main' || github.repository != 'unicode-org/icu4x'
278+ name : " Authenticate to Google Cloud with JSON Credentials"
279+ uses : google-github-actions/auth@71fee32a0bb7e97b4d33d548e7d957010649d8fa # v2.1.3
280+ with :
281+ credentials_json : ' ${{ secrets.ICU4X_GCP_SA_KEY }}'
282+ - id : gcp-auth-main
283+ if : github.ref == 'refs/heads/main' && github.repository == 'unicode-org/icu4x'
284+ name : " Authenticate to Google Cloud with Workload Identity Provider"
285+ uses : google-github-actions/auth@71fee32a0bb7e97b4d33d548e7d957010649d8fa # v2.1.3
286+ with :
287+ workload_identity_provider : " projects/66042061814/locations/global/workloadIdentityPools/icu4x-gha-pool1/providers/icu4x-gha-provider1"
288+ service_account :
" [email protected] " 289+ - name : " Set up Google Cloud SDK"
290+ uses : google-github-actions/setup-gcloud@98ddc00a17442e89a24bbf282954a3b65ce6d200 # v2.1.0
291+
292+ - name : Build docs
293+ run : |
294+ cd ffi/mvn
295+ mvn dokka:dokka
296+ cd ../..
297+
298+ - uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
299+ with :
300+ name : kdoc
301+ path : ffi/mvn/target/dokka
302+
303+ - name : Upload docs to Google Cloud Storage (non-main)
304+ run : |
305+ gsutil -m cp -r ffi/mvn/target/dokka gs://${{ env.GCP_PR_BUCKET_ID }}/gha/${{ github.sha }}/kdoc
306+
307+ - name : Upload docs to Google Cloud Storage (main)
308+ if : github.ref == 'refs/heads/main' && github.repository == 'unicode-org/icu4x'
309+ run : |
310+ gsutil -m cp -r ffi/mvn/target/dokka/* gs://${{ env.GCP_MAIN_BUCKET_ID }}/gha/kdoc
311+
312+ - name : " ⭐⭐⭐ Links to Uploaded Artifacts ⭐⭐⭐"
313+ run : |
314+ echo "📖 Kotlin docs"
315+ echo "http://${{ env.GCP_PR_BUCKET_ID }}.storage.googleapis.com/gha/${{ github.sha }}/kdoc/index.html"
316+
268317 wasm-demo :
269318 # This is too expensive to run on every push, so only run it on main.
270319 if : github.ref == 'refs/heads/main' && github.repository == 'unicode-org/icu4x'
0 commit comments