fix prerelease version string #11
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: Release | |
on: | |
push: | |
branches: | |
- master | |
- prerelease | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: windows-latest | |
env: | |
version: 2.0.${{ github.run_number }}${{ github.ref == 'refs/heads/master' && '' || '-prerelease' }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 8.0.x | |
- name: Install NUnit.ConsoleRunner | |
run: nuget install NUnit.ConsoleRunner -Version 3.17.0 -DirectDownload -OutputDirectory . | |
- name: Install dependencies | |
run: dotnet restore | |
- name: Install dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --configuration Release --no-restore /p:version=${{ env.version }} | |
- name: Tests | |
run: ./NUnit.ConsoleRunner.3.17.0/tools/nunit3-console.exe "Sharp7.Rx.Tests\bin\Release\net8.0\Sharp7.Rx.Tests.dll" | |
- name: NugetPublish | |
if: github.event_name == 'push' | |
run: dotnet nuget push Sharp7.Rx\bin\Release\Sharp7.Rx.${{ env.version }}.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_DEPLOY_KEY }} | |