mirror of
https://github.com/evopro-ag/Sharp7Reactive.git
synced 2025-12-16 03:42:51 +00:00
Unify build process
This commit is contained in:
30
.github/workflows/prerelease.yml
vendored
30
.github/workflows/prerelease.yml
vendored
@@ -1,30 +0,0 @@
|
||||
name: Prerelease
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- prerelease
|
||||
pull_request:
|
||||
branches: [ prerelease ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: windows-latest
|
||||
|
||||
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: Build
|
||||
run: dotnet build --configuration Release --no-restore /p:version=2.0.${{ github.run_number }}-prerelease
|
||||
- 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
|
||||
run: dotnet nuget push Sharp7.Rx\bin\Release\Sharp7.Rx.2.0.${{ github.run_number }}-prerelease.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_DEPLOY_KEY }}
|
||||
31
.github/workflows/release.yml
vendored
31
.github/workflows/release.yml
vendored
@@ -1,42 +1,37 @@
|
||||
name: Release
|
||||
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: 5.0.x
|
||||
dotnet-version: 8.0.x
|
||||
- name: Install NUnit.ConsoleRunner
|
||||
run: nuget install NUnit.ConsoleRunner -Version 3.13.0 -DirectDownload -OutputDirectory .
|
||||
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=1.1.${{ github.run_number }}
|
||||
run: dotnet build --configuration Release --no-restore /p:version=${{ env.version }}
|
||||
- name: Tests
|
||||
run: ./NUnit.ConsoleRunner.3.13.0/tools/nunit3-console.exe "Sharp7.Rx.Tests\bin\Release\net461\Sharp7.Rx.Tests.dll"
|
||||
run: ./NUnit.ConsoleRunner.3.17.0/tools/nunit3-console.exe "Sharp7.Rx.Tests\bin\Release\net8.0\Sharp7.Rx.Tests.dll"
|
||||
- name: NugetPublish
|
||||
run: dotnet nuget push Sharp7.Rx\bin\Release\Sharp7.Rx.1.1.${{ github.run_number }}.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_DEPLOY_KEY }}
|
||||
if: github.event_name != 'pull_request'
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: 1.1.${{ github.run_number }}
|
||||
release_name: 1.1.${{ github.run_number }}
|
||||
draft: false
|
||||
prerelease: true
|
||||
if: github.event_name != 'pull_request'
|
||||
if: github.event_name == 'push'
|
||||
run: dotnet nuget push Sharp7.Rx\bin\Release\Sharp7.Rx.2.0.${{ env.version }}.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_DEPLOY_KEY }}
|
||||
|
||||
Reference in New Issue
Block a user