Skip to content

Update Dependencies #1771

Update Dependencies

Update Dependencies #1771

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.properties
- 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@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: ['2019', '2020', '2021', '2022', '6000']
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?stream=LTS&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@v3
with:
ssh-key: ${{ secrets.CI_DEPLOY_KEY }}
- name: Update sample ProjectVersion.txt
if: ${{ matrix.unity-prefix == '2019' }}
run: |
"m_EditorVersion: ${{ steps.version-select.outputs.version }}`nm_EditorVersionWithRevision: ${{ steps.version-select.outputs.version }} (${{ steps.version-select.outputs.changeset }})" `
| Out-File "samples\unity-of-bugs\ProjectSettings\ProjectVersion.txt"
- name: Update ci-env.ps1
run: |
$file = "scripts/ci-env.ps1"
$regexVersion = '${{ matrix.unity-prefix }}' + "[0-9.a-z]+"
echo "Regex: $regexVersion"
(Get-Content $file) -replace $regexVersion, '${{ steps.version-select.outputs.version }}' | Out-File $file
- run: git --no-pager diff
- name: Create PR
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # pin#v7.0.5
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