Skip to content

Merge pull request #249 from baoduy/copilot/update-dotnet-publish-wor… #102

Merge pull request #249 from baoduy/copilot/update-dotnet-publish-wor…

Merge pull request #249 from baoduy/copilot/update-dotnet-publish-wor… #102

name: .NET
permissions:
contents: read
packages: write
on:
push:
branches:
- 'main'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
## Only build nuget package and release to Nuget.org when running on main branch
dotnet_pack_release_job:

Check failure on line 18 in .github/workflows/dotnet-publish.yml

View workflow run for this annotation

GitHub Actions / .NET

Invalid workflow file

The workflow is not valid. .github/workflows/dotnet-publish.yml (Line: 18, Col: 3): Error calling workflow 'baoduy/ShareWorkflows/.github/workflows/dotnet-nuget-release.yml@main'. The nested job 'build' is requesting 'contents: write', but is only allowed 'contents: read'.
uses: baoduy/ShareWorkflows/.github/workflows/dotnet-nuget-release.yml@main
with:
Project_Path: 'src/DKNet.FW.sln'
Enable_Release: false ## ${{ github.ref == 'refs/heads/main'}}
Enable_Nuget_Release: ${{ github.ref == 'refs/heads/main'}}
Dotnet_Version: 10.x
secrets:
PACKAGE_TOKEN: ${{ secrets.PACKAGE_TOKEN }}
NUGET_PACKAGE_TOKEN: ${{ secrets.NUGET_PACKAGE_TOKEN }}