2.11.0 #23
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
name: Publish | |
env: | |
SOLUTION_PATH: allure-csharp.sln | |
BUILD_CONFIGURATION: 'Release' | |
RESTORE_OUTPUT_PATH: 'packages' | |
PACKAGE_OUTPUT_PATH: 'artifacts' | |
on: | |
release: | |
types: [ published ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- name: 'Setup .NET Core SDK' | |
uses: actions/[email protected] | |
with: | |
dotnet-version: | | |
3.1.x | |
6.0.x | |
7.0.x | |
- name: 'Restore packages' | |
run: dotnet restore ${{ env.SOLUTION_PATH }} --packages ${{ env.RESTORE_OUTPUT_PATH }} | |
- name: 'Build project using dotnet' | |
run: dotnet build ${{ env.SOLUTION_PATH }} --no-restore --configuration ${{ env.BUILD_CONFIGURATION }} -p:ContinuousIntegrationBuild=true | |
# Lower AspectInjector requirement for users of the packages to workaround #391 (build crash on macOS arm machines) | |
- name: Reduce AspectInjector requirement to 2.8.1 | |
run: | | |
dotnet add Allure.Net.Commons package AspectInjector --version 2.8.1 | |
dotnet add Allure.XUnit package AspectInjector --version 2.8.1 | |
- name: 'Pack project' | |
run: dotnet pack ${{ env.SOLUTION_PATH }} --no-restore --no-build --configuration ${{ env.BUILD_CONFIGURATION }} -p:PackageOutputPath=${{ env.PACKAGE_OUTPUT_PATH }} | |
- name: 'NuGet publish' | |
run: | | |
dotnet nuget push "*/${{ env.PACKAGE_OUTPUT_PATH }}/*.nupkg" -k ${NUGET_TOKEN} -s https://api.nuget.org/v3/index.json | |
env: | |
NUGET_TOKEN: ${{ secrets.NUGET_TOKEN }} |