Adjust gitversion #15
Workflow file for this run
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: Update Uno Sdk | |
on: | |
schedule: | |
- cron: '0 * * * *' | |
pull_request: | |
branches: | |
- main | |
paths: | |
- .github/workflows/uno-updater.yml | |
- tools/Uno.Sdk.Updater/* | |
workflow_dispatch: | |
inputs: | |
branch: | |
description: 'Branch to update' | |
required: true | |
default: 'main' | |
jobs: | |
manifest-update: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: '8.0.300' | |
- name: Setup GitVersion | |
uses: gittools/actions/gitversion/[email protected] | |
with: | |
versionSpec: '5.10.3' | |
- name: GitVersion | |
id: gitversion | |
uses: gittools/actions/gitversion/[email protected] | |
with: | |
useConfigFile: true | |
configFilePath: build/gitversion.yml | |
- name: Run Uno Sdk Updater | |
run: dotnet run -c Release --project tools/Uno.Sdk.Updater | |
- name: Create Pull Request | |
if: github.event_name != 'pull_request' | |
id: cpr | |
uses: peter-evans/create-pull-request@6d6857d36972b65feb161a90e484f2984215f83e # v6.0.5 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
branch: dev/sdk/update | |
commit-message: 'chore: Update Uno.Sdk' | |
title: Uno.Sdk Update | |
body: | | |
This updates the Uno.Sdk to the latest available version. | |
labels: sdk-update | |
draft: false | |
- name: Enable Pull Request Automerge | |
if: steps.cpr.outputs.pull-request-operation == 'created' | |
uses: peter-evans/enable-pull-request-automerge@a660677d5469627102a1c1e11409dd063606628d # v3.0.0 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }} | |
- name: Auto approve | |
if: steps.cpr.outputs.pull-request-operation == 'created' | |
run: gh pr review --approve "${{ steps.cpr.outputs.pull-request-number }}" | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |