Skip to content

Update Dependencies #1049

Update Dependencies

Update Dependencies #1049

Workflow file for this run

name: Update Dependencies
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
update-dep:
name: Bump Dependencies PR
runs-on: ubuntu-latest
defaults:
run:
shell: pwsh
steps:
- uses: actions/checkout@v3
- name: Bump nuget package version
id: update-csproj
run: |
$jdata = curl --silent "https://api.github.com/repos/ppy/osu/releases/latest" | ConvertFrom-Json
$latestVer = $jdata.tag_name
$valid = ![string]::IsNullOrWhiteSpace($latestVer)
if($valid)
{
echo $latestVer
$regex = '(?<=\"ppy\.osu\.Game.*\"\s*Version\s*=\s*\")(.*)(?=\")'
(Get-Content osu.Game.Rulesets.Diva\osu.Game.Rulesets.Diva.csproj) -replace $regex, $latestVer | Set-Content osu.Game.Rulesets.Diva\osu.Game.Rulesets.Diva.csproj
echo "OSU_VERSION=$latestVer" >> "$GITHUB_OUTPUT"
}
- run: git --no-pager diff
- name: Create PR
uses: peter-evans/[email protected]
with:
token: ${{ secrets.PAT }}
branch: osu-bump
commit-message: 'chore: update osu packages to ${{ steps.update-csproj.outputs.OSU_VERSION }}'
title: 'Update to osu! ${{ steps.update-csproj.outputs.OSU_VERSION }}'
base: master
body: |
#skip-changelog
Auto-generated by [create-pull-request](https://github.com/peter-evans/create-pull-request)
labels: dependencies
delete-branch: true