24.50.0 #203
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#### 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 |