π Update Eco NuGet Package #959
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 Eco NuGet Package' | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '30,0 0,12-16 * * *' | |
jobs: | |
sync-eco-package: | |
runs-on: ubuntu-latest | |
name: 'π§ Sync Eco NuGet Package' | |
permissions: | |
contents: write | |
pull-requests: write | |
env: | |
packageId: 'Eco.ReferenceAssemblies' | |
steps: | |
- name: π Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: π Execute script | |
id: sync-eco-package | |
shell: pwsh | |
run: | | |
Push-Location -Path ./src | |
$result = ./update-nuget-package.ps1 -projectFilePath "./jcdcdev.Eco.Core/jcdcdev.Eco.Core.csproj" -packageId $env:packageId | |
Write-Output "updated=$($result.Updated)" >> $env:GITHUB_OUTPUT | |
Write-Output "target-version=$($result.TargetVersion)" >> $env:GITHUB_OUTPUT | |
Write-Output "source-version=$($result.SourceVersion)" >> $env:GITHUB_OUTPUT | |
Pop-Location | |
- name: π€ Make Pull Request | |
if: steps.sync-eco-package.outputs.updated == 'true' | |
uses: peter-evans/create-pull-request@v3 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
commit-message: "feature: Support Eco ${{ steps.sync-eco-package.outputs.target-version }}" | |
title: "Update ${{ env.packageId }} to ${{ steps.sync-eco-package.outputs.target-version }}" | |
body: "This PR updates the ${{ env.packageId }} NuGet package from ${{ steps.sync-eco-package.outputs.source-version }} to ${{ steps.sync-eco-package.outputs.target-version }}." | |
branch: "update-${{ env.packageId }}-from-${{ steps.sync-eco-package.outputs.source-version }}-to-${{ steps.sync-eco-package.outputs.target-version }}" | |
labels: "automated" | |
reviewers: "jcdcdev" | |
assignees: "jcdcdev" |