Skip to content

24.50.0

24.50.0 #203

Workflow file for this run

#### Build and tests all pushes, also code coverage
name: 📦 Publish nuget
on:
release:
types:
- released
- prereleased
jobs:
deploy_nuget:
name: 📦 publish nuget packages
runs-on: ubuntu-latest
environment: CI - release environment
steps:
- name: 📤 Checkout the repository
uses: actions/checkout@main
with:
fetch-depth: 0
- name: ⏭️ Get next version
id: version
run: |
latest=$(git describe --tags $(git rev-list --tags --max-count=1))
echo Current version: $latest
echo "::set-output name=version::$latest"
- name: 🥅 Install .Net 9
uses: actions/setup-dotnet@v3
with:
dotnet-version: "9.0.x" # SDK Version
- name: 🔖 Set version number
run: |
sed -i '/ private const string Version = /c\ private const string Version = "${{ steps.version.outputs.version }}";' ${{github.workspace}}/src/Runtime/NetDaemon.Runtime/Internal/NetDaemonRuntime.cs
- name: 🎁 Pack
run: dotnet pack NetDaemon.sln --configuration Release -p:PackageVersion=${{ steps.version.outputs.version }} -p:Version=${{ steps.version.outputs.version }}
- name: 📨 Push to nuget
run: dotnet nuget push **/*.nupkg --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json