Skip to content

Commit

Permalink
Create publish-dotnet-template.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
GordonBeeming authored Nov 5, 2023
1 parent 8164e7c commit 5ebe166
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/publish-dotnet-template.yml
Original file line number Diff line number Diff line change
@@ -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}}

0 comments on commit 5ebe166

Please sign in to comment.