Skip to content

Commit

Permalink
Fix release publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
nirbar committed Feb 26, 2025
1 parent c06c432 commit 65289ba
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@ jobs:
- uses: actions/checkout@v4.2.2
- uses: microsoft/setup-msbuild@v2

- name: Set version
run: Add-Content -Path $env:GITHUB_ENV -Value "FULL_VERSION=${{ github.event.inputs.version }}.${{ github.run_number }}"

- name: Build
run: dotnet build dirs.proj -restore -p:Configuration=Release -p:FullVersion=${{ github.event.inputs.version }}.${{ github.run_number }}
run: dotnet build dirs.proj -restore -p:Configuration=Release -p:FullVersion=${{ env.FULL_VERSION }}

- name: Publish artifacts
uses: actions/upload-artifact@v4.6.1
Expand All @@ -39,17 +42,17 @@ jobs:
if: ${{ github.event.inputs.publish_nuget == 'true' }}
run: |
dotnet nuget add source --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json"
dotnet nuget push build\MsiZapEx\Release\bin\MsiZapEx.*.nupkg --api-key ${{ secrets.GITHUB_TOKEN }} --source github
dotnet nuget push build\MsiZapEx\Release\bin\MsiZapEx.*.nupkg --api-key ${{ secrets.NUGET_TOKEN }} --source https://api.nuget.org/v3/index.json
dotnet nuget push build\MsiZapEx\Release\bin\MsiZapEx.${{ env.FULL_VERSION }}.nupkg --api-key ${{ secrets.GITHUB_TOKEN }} --source github
dotnet nuget push build\MsiZapEx\Release\bin\MsiZapEx.${{ env.FULL_VERSION }}.nupkg --api-key ${{ secrets.NUGET_TOKEN }} --source https://api.nuget.org/v3/index.json
- name: Publish release
uses: softprops/action-gh-release@v2.2.1
if: ${{ github.event.inputs.publish_release == 'true' }}
with:
prerelease: false
generate_release_notes: true
tag_name: ${{ env.FullVersion }}
tag_name: ${{ env.FULL_VERSION }}
files: |
build\MsiZapEx\Release\bin\MsiZapEx.${{ env.FullVersion }}.nupkg
build\MsiZapEx\Release\bin\MsiZapEx.${{ env.FULL_VERSION }}.nupkg
build/net40/MsiZapEx/Release/bin/MsiZapEx.exe
build/net40/MsiZapEx/Release/bin/CommandLine.dll

0 comments on commit 65289ba

Please sign in to comment.