Skip to content

Update Dependencies #3104

Update Dependencies

Update Dependencies #3104

Workflow file for this run

name: "Update Dependencies"
on:
# Run every day on multiple occasions, with each job running at a different time to limit license-acquisition issues.
schedule:
- cron: '0 2 * * *'
- cron: '0 3 * * *'
# Allow a manual trigger to be able to run the update when there are new dependencies or after a PR merge to resolve CHANGELOG conflicts.
workflow_dispatch:
jobs:
deps:
name: ${{ matrix.name }}
# Note: we're using the negative check here so this runs also for workflow_dispatch.
if: github.event.schedule != '0 2 * * *'
strategy:
fail-fast: false
matrix:
include:
- name: Cocoa SDK
path: modules/sentry-cocoa
- name: Java SDK
path: modules/sentry-java
- name: Native SDK
path: modules/sentry-native
- name: .NET SDK
path: src/sentry-dotnet
- name: CLI
path: modules/sentry-cli.properties
uses: getsentry/github-workflows/.github/workflows/updater.yml@1949ea01ec2da6139d1bcc306c372e6aea76fb72 # v2
with:
name: ${{ matrix.name }}
path: ${{ matrix.path }}
secrets:
api-token: ${{ secrets.CI_DEPLOY_KEY }}
unity:
name: Unity ${{ matrix.unity-prefix }} PR
# Note: we're using the negative check here so this runs also for workflow_dispatch.
if: github.event.schedule != '0 3 * * *'
runs-on: ubuntu-latest
defaults:
run:
shell: pwsh
strategy:
fail-fast: false
matrix:
unity-prefix: ['2021.3', '2022.3', '6000.0', '6000.3']
steps:
- name: Find the latest Unity version
id: version-select
run: |
$ProgressPreference = 'SilentlyContinue'
$json = Invoke-WebRequest -UseBasicParsing 'https://services.api.unity.com/unity/editor/release/v1/releases?limit=1&offset=0&platform=WINDOWS&version=${{ matrix.unity-prefix }}'
$latest = ($json.Content | ConvertFrom-Json).results[0]
echo "Latest version: $latest"
"version=$($latest.version)" >> $env:GITHUB_OUTPUT
"changeset=$($latest.shortRevision)" >> $env:GITHUB_OUTPUT
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ssh-key: ${{ secrets.CI_DEPLOY_KEY }}
- name: Update unity-versions.json
run: |
$file = "scripts/unity-versions.json"
$data = Get-Content $file -Raw | ConvertFrom-Json
$prefix = '${{ matrix.unity-prefix }}'
$data.$prefix.version = '${{ steps.version-select.outputs.version }}'
$data.$prefix.changeset = '${{ steps.version-select.outputs.changeset }}'
$data | ConvertTo-Json -Depth 3 | Set-Content $file
- run: git --no-pager diff
- name: Create PR
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
with:
branch: chore/unity-${{ steps.version-select.outputs.version }}
commit-message: 'chore: update to Unity ${{ steps.version-select.outputs.version }}'
title: 'Update to Unity ${{ steps.version-select.outputs.version }}'
base: main
body: |
#skip-changelog
Auto-generated by [create-pull-request](https://github.com/peter-evans/create-pull-request)
labels: Repository Maintenance