From 5ebe16675b719d17aa0e8a9e7c640e49b74edd5c Mon Sep 17 00:00:00 2001 From: "Gordon Beeming [SSW]" Date: Sun, 5 Nov 2023 13:13:01 +0200 Subject: [PATCH] Create publish-dotnet-template.yml --- .github/workflows/publish-dotnet-template.yml | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/publish-dotnet-template.yml diff --git a/.github/workflows/publish-dotnet-template.yml b/.github/workflows/publish-dotnet-template.yml new file mode 100644 index 0000000..d48d070 --- /dev/null +++ b/.github/workflows/publish-dotnet-template.yml @@ -0,0 +1,27 @@ +name: Publish .NET Template + +on: + push: + branches: [ "main" ] + +jobs: + publish: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - uses: nuget/setup-nuget@v1 + with: + nuget-version: '6.x' + + - name: Get version number + id: version + run: echo "::set-output name=version::$(date +'%Y.%m.%d').$GITHUB_RUN_NUMBER" + + - name: Create package + run: nuget pack DefaultCSharpRepoFiles.nuspec -NoDefaultExcludes -version ${{ steps.version.outputs.version }} + + - name: Publish package + run: nuget push *.nupkg -Source 'https://api.nuget.org/v3/index.json' -ApiKey ${{secrets.NUGET_API_KEY}} +