mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Add GitHub action for PR creation and Wix file generation logic (#12748)
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
# Copyright (c) Microsoft Corporation.
|
||||
# Licensed under the MIT license.
|
||||
|
||||
name: PowerShell Daily
|
||||
on:
|
||||
schedule:
|
||||
# At 13:00 UTC every day.
|
||||
- cron: '0 13 * * *'
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: pwsh
|
||||
|
||||
env:
|
||||
DOTNET_CLI_TELEMETRY_OPTOUT: 1
|
||||
POWERSHELL_TELEMETRY_OPTOUT: 1
|
||||
|
||||
jobs:
|
||||
update-dotnet-preview:
|
||||
name: Update .NET preview
|
||||
timeout-minutes: 15
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Sync tags
|
||||
run: |
|
||||
git fetch --prune --unshallow --tags
|
||||
- name: Execute Update .NET script
|
||||
run: |
|
||||
$currentVersion = (Get-Content .\global.json | ConvertFrom-Json).sdk.version
|
||||
Write-Verbose "name=OLD_VERSION::$currentVersion" -Verbose
|
||||
Write-Host "::set-env name=OLD_VERSION::$currentVersion"
|
||||
|
||||
./tools/UpdateDotnetRuntime.ps1 -UpdateMSIPackaging
|
||||
$newVersion = (Get-Content .\global.json | ConvertFrom-Json).sdk.version
|
||||
Write-Verbose "name=NEW_VERSION::$newVersion" -Verbose
|
||||
Write-Host "::set-env name=NEW_VERSION::$newVersion"
|
||||
|
||||
if ($currentVersion -ne $newVersion) {
|
||||
Write-Verbose "name=CREATE_PR::true" -Verbose
|
||||
Write-Host "::set-env name=CREATE_PR::true"
|
||||
}
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v2
|
||||
id: cpr
|
||||
if: env.CREATE_PR == 'true'
|
||||
with:
|
||||
commit-message: "Update .NET SDK version from `${{ env.OLD_VERSION }}` to `${{ env.NEW_VERSION }}`"
|
||||
title: "Update .NET SDK version from `${{ env.OLD_VERSION }}` to `${{ env.NEW_VERSION }}`"
|
||||
base: master
|
||||
branch: dotnet_update
|
||||
|
||||
|
||||
Reference in New Issue
Block a user