diff --git a/.github/workflows/update-deps.yml b/.github/workflows/update-deps.yml index f4a5a5d7d5..8750685e9b 100644 --- a/.github/workflows/update-deps.yml +++ b/.github/workflows/update-deps.yml @@ -1,10 +1,13 @@ name: Update Dependencies on: - # Run every day. schedule: + # Run every day. - cron: '0 3 * * *' - # And on on every PR merge so we get the updated dependencies ASAP, and to make sure the changelog doesn't conflict. + # Run weekly (select btw daily or weekly via `if:`). + - cron: '0 4 * * 1' + # Also trigger on pushes to main (individual jobs decide whether to run). E.g., lets us get updated + # dependencies ASAP and make sure the changelog doesn't conflict. push: branches: - main @@ -15,7 +18,9 @@ permissions: actions: write jobs: + # Update the Sentry Native SDK dependency daily and on pushes to main. native: + if: github.event.schedule != '0 4 * * 1' runs-on: ubuntu-latest steps: - uses: getsentry/github-workflows/updater@36529d71129a14967bea1fb81bcaf2a5943cf877 # v3 @@ -23,3 +28,17 @@ jobs: path: scripts/update-sentry-native-ndk.sh name: Native SDK ssh-key: ${{ secrets.CI_DEPLOY_KEY }} + + # Update weekly the kotlinx.serialization version used by the Nav3 R8 tests. (Verifying a new + # version before the next SDK release is sufficient.) + nav3-kotlinx-serialization: + if: github.event.schedule == '0 4 * * 1' + runs-on: ubuntu-latest + steps: + - uses: getsentry/github-workflows/updater@36529d71129a14967bea1fb81bcaf2a5943cf877 # v3 + with: + path: scripts/update-nav3-kotlinx-serialization.sh + name: Nav3 kotlinx.serialization R8 check + # Only the R8 verification app uses this version; the SDK's dependency doesn't change. + changelog-entry: false + ssh-key: ${{ secrets.CI_DEPLOY_KEY }} diff --git a/scripts/update-nav3-kotlinx-serialization.sh b/scripts/update-nav3-kotlinx-serialization.sh index 717f3492f9..d425416f16 100755 --- a/scripts/update-nav3-kotlinx-serialization.sh +++ b/scripts/update-nav3-kotlinx-serialization.sh @@ -17,6 +17,18 @@ get-version) # compares upstream changelogs. perl -ne 'print "v$1\n" if ( m/^defaultLatestKotlinx="([0-9.]+)"/ )' "$SCRIPT_FILEPATH" ;; +get-repo) + echo "https://github.com/Kotlin/kotlinx.serialization.git" + ;; +set-version) + # kotlinx.serialization tags are prefixed with "v" (e.g. v1.13.0). + version=${2#v} + + echo "Setting defaultLatestKotlinx to '$version'" + + PATTERN='^(defaultLatestKotlinx=")[0-9.]+(")' + perl -pi -e "s/$PATTERN/\${1}$version\${2}/" "$SCRIPT_FILEPATH" + ;; *) echo "Unknown argument $1" exit 1