Force workflow to use dotnet 8 #34
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
name: publish to nuget | |
on: | |
push: | |
branches: | |
- master | |
env: | |
VERSION: 2.${{ github.run_number }} | |
jobs: | |
publish: | |
name: build, pack & publish | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup dotnet | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 8.0.x | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Build project (Websocket) | |
run: dotnet build Nomia.Websocket/Nomia.Websocket.csproj --configuration Release -o build | |
- name: Pack NuGet package (Websocket) | |
run: dotnet pack Nomia.Websocket/Nomia.Websocket.csproj --configuration Release /p:Version=${VERSION} -o build | |
- name: Push NuGet package (Websocket) | |
run: nuget push build/Nomia.Websocket.${VERSION}.nupkg -ApiKey ${{ secrets.NUGET_API_KEY }} -Source https://api.nuget.org/v3/index.json | |
# Building original library | |
- name: Build project | |
run: dotnet build Nomia/Nomia.csproj --configuration Release -o build | |
- name: Pack NuGet package | |
run: dotnet pack Nomia/Nomia.csproj --configuration Release /p:Version=${VERSION} -o build | |
- name: Push NuGet package (Websocket) | |
run: nuget push build/Nomia.${VERSION}.nupkg -ApiKey ${{ secrets.NUGET_API_KEY }} -Source https://api.nuget.org/v3/index.json |