Skip to content

Commit

Permalink
Update buildAndPublish.yml to include 'forRelease' input
Browse files Browse the repository at this point in the history
  • Loading branch information
mgrosperrin committed Feb 25, 2024
1 parent a032338 commit 9a5839a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/buildAndPublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
description: 'NuGet feed URL'
required: true
type: string
forRelease:
description: 'Run for release?'
required: true
type: boolean
secrets:
feedAPIKey:
description: 'NuGet feed API key'
Expand All @@ -26,12 +30,12 @@ jobs:
uses: PaulHatch/[email protected]
with:
tag_prefix: ''
version_format: '${major}.${minor}.${patch}-preview${increment}'
version_format: "${major}.${minor}.${patch}${{ !inputs.forRelease && '-preview${increment}' || '' }}"
search_commit_body: true
debug: true

- name: Output version
run: echo "Version is ${{ steps.version.outputs.debug_output }}"
run: echo "Version is ${{ toJSON(steps.version.outputs.debug_output) }}"

- name: Setup dotnet ${{ env.DOTNET_VERSION }}
uses: actions/setup-dotnet@v3
Expand All @@ -46,7 +50,7 @@ jobs:

- name: Upload dotnet test results
uses: dorny/[email protected]
if: always()
if: ${{ !cancelled() }}
with:
name: .NET Tests
path: '**/MGR.Guard.UnitTests.trx'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@ jobs:
uses: ./.github/workflows/buildAndPublish.yml
with:
feedUrl: https://www.myget.org/F/mgrosperrin/api/v3/index.json
forRelease: false
secrets:
feedAPIKey: ${{ secrets.MYGET_CI_API_KEY }}
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
uses: ./.github/workflows/buildAndPublish.yml
with:
feedUrl: https://api.nuget.org/v3/index.json
forRelease: true
secrets:
feedAPIKey: ${{ secrets.NUGET_API_KEY }}

Expand Down

0 comments on commit 9a5839a

Please sign in to comment.