Skip to content

Commit

Permalink
test release flag functioning
Browse files Browse the repository at this point in the history
  • Loading branch information
corstian committed Dec 31, 2024
1 parent 8392633 commit 0c51b4a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,26 +36,26 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Setup .NET
if: steps.semantic.outputs.new_release_published
if: steps.semantic.outputs.new_release_published == 'true'
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Restore
if: steps.semantic.outputs.new_release_published
if: steps.semantic.outputs.new_release_published == 'true'
run: dotnet restore /property:Configuration=Release
- name: Write release notes
if: steps.semantic.outputs.new_release_published
if: steps.semantic.outputs.new_release_published == 'true'
env:
RELEASE_NOTES: "${{ steps.semantic.outputs.new_release_notes}}"
run: echo "$RELEASE_NOTES" > "./src/Whaally.Domain/release-notes.txt"
- name: Build for Publish
if: steps.semantic.outputs.new_release_published
if: steps.semantic.outputs.new_release_published == 'true'
run: |
if [ ! -z "${{ steps.semantic.outputs.new_release_version }}" ]; then
dotnet build --configuration Release /property:Version="${{ steps.semantic.outputs.new_release_version }}" /property:AssemblyVersion="${{steps.semantic.outputs.new_release_major_version}}" /property:AssemblyFileVersion="${{ steps.semantic.outputs.new_release_version }}" --no-restore
else
dotnet build --configuration Release --no-restore
fi
- name: Publish
if: steps.semantic.outputs.new_release_published && (startsWith(github.ref, 'refs/heads/main') || startsWith(github.ref, 'refs/heads/beta'))
if: steps.semantic.outputs.new_release_published == 'true' && (startsWith(github.ref, 'refs/heads/main') || startsWith(github.ref, 'refs/heads/beta'))
run: dotnet nuget push **\*.nupkg --source 'https://api.nuget.org/v3/index.json' --api-key ${{secrets.NUGET_API_KEY}} --skip-duplicate

0 comments on commit 0c51b4a

Please sign in to comment.