Skip to content

v1.2.4

v1.2.4 #62

Workflow file for this run

# Builds a final release version and pushes to nuget.org
# whenever a release is published.
# Requires: secrets.NUGET_API_KEY
name: publish
on:
release:
types: [prereleased, released]
env:
DOTNET_NOLOGO: true
Configuration: Release
VersionLabel: ${{ github.ref }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
MSBUILDTERMINALLOGGER: auto
jobs:
publish:
runs-on: windows-latest
steps:
- name: 🤘 checkout
uses: actions/checkout@v4
- name: ⚙ msbuild
uses: microsoft/[email protected]
- name: 🙏 build
shell: pwsh
working-directory: src/NuGetizer.Tests
run: |
dotnet restore Scenarios/given_a_packaging_project/a.nuproj
msbuild -r
- name: 🐛 logs
uses: actions/upload-artifact@v3
if: runner.debug && always()
with:
name: binlog-build-${{ github.run_number }}
path: src/NuGetizer.Tests/msbuild.binlog
- name: 🧪 test
run: |
dotnet tool update -g dotnet-retest
dotnet retest -- --no-build
- name: 📦 pack
run: dotnet pack
- name: 🐛 logs
uses: actions/upload-artifact@v3
if: runner.debug && always()
with:
name: binlog-pack-${{ github.run_number }}
path: msbuild.binlog
- name: 🚀 nuget
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
if: env.NUGET_API_KEY != ''
working-directory: bin
run: dotnet nuget push *.nupkg -s https://api.nuget.org/v3/index.json -k ${{secrets.NUGET_API_KEY}} --skip-duplicate
- name: 🚀 sleet
env:
SLEET_CONNECTION: ${{ secrets.SLEET_CONNECTION }}
if: env.SLEET_CONNECTION != ''
run: |
dotnet tool install -g --version 4.0.18 sleet
sleet push bin --config none -f --verbose -p "SLEET_FEED_CONTAINER=nuget" -p "SLEET_FEED_CONNECTIONSTRING=${{ secrets.SLEET_CONNECTION }}" -p "SLEET_FEED_TYPE=azure" || echo "No packages found"