Version bump #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Sync Unity Package Version | |
on: | |
pull_request: | |
paths: | |
- 'src/Directory.Build.props' | |
push: | |
branches: | |
- develop | |
paths: | |
- 'src/Directory.Build.props' | |
workflow_dispatch: | |
permissions: | |
contents: write | |
pull-requests: write | |
jobs: | |
sync-unity-version: | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.head_ref }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: | | |
8.0.x | |
- name: Install dotnet-script | |
run: | | |
dotnet tool install -g dotnet-script | |
echo "$HOME/.dotnet/tools" >> $GITHUB_PATH | |
- name: Sync Unity Package Version | |
run: dotnet-script ./.github/scripts/sync-unity-version.csx | |
- name: Check for changes | |
id: git-check | |
run: | | |
git diff --quiet || echo "changes=true" >> $GITHUB_OUTPUT | |
- name: Commit changes | |
if: steps.git-check.outputs.changes == 'true' | |
run: | | |
git config --global user.name 'github-actions[bot]' | |
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
git add -u | |
git commit -m "Sync Unity Package Versions" | |
git push |