Feature/scenario report #37
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: pr-verification | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
jobs: | |
build-template-presenter: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '18' | |
- name: Install Dependencies | |
run: npm install | |
working-directory: src/nscenario-report-browser/ | |
- name: Build | |
run: npm run build | |
working-directory: src/nscenario-report-browser/ | |
- name: Pack | |
working-directory: src/nscenario-report-browser/ | |
shell: script -e -c {0} | |
run: | | |
npm install -g inliner | |
inliner -nm --preserve-comments build/index.html > build/report-browser-template.html | |
- name: Upload template | |
uses: actions/upload-artifact@master | |
with: | |
name: report-browser-template | |
path: 'src/nscenario-report-browser/build/report-browser-template.html' | |
- name: Upload all | |
uses: actions/upload-artifact@master | |
with: | |
name: report-browser-template-all | |
path: 'src/nscenario-report-browser/build' | |
build-extension: | |
runs-on: windows-latest | |
needs: build-template-presenter | |
env: | |
DOTNET_NOLOGO: true | |
DOTNET_CLI_TELEMETRY_OPTOUT: true | |
RepositoryUrl: 'https://github.com/${{ github.repository }}' | |
RepositoryBranch: '${{ github.ref }}' | |
SourceRevisionId: '${{ github.sha }}' | |
VersionSuffix: 'pr-${{github.event.number}}.${{ github.run_number }}' | |
Configuration: Release | |
SolutionPath: src\NScenario.sln | |
Deterministic: true | |
PackageReleaseNotes: 'https://github.com/${{ github.repository }}/releases' | |
ContinuousIntegrationBuild: true | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup .NET Core 8 | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: '8.0' | |
- name: Calculate next version | |
uses: cezarypiatek/NextVersionGeneratorAction@0.4 | |
with: | |
minor-pattern: '.*' | |
major-pattern: 'BREAKING CHANGES' | |
output-to-env-variable: 'VersionPrefix' | |
- name: Download report-browser-template.html | |
uses: actions/download-artifact@master | |
with: | |
name: report-browser-template | |
path: src/NScenario/ | |
- name: Materialize Signing Key | |
id: write_sign_key_file | |
uses: timheuer/base64-to-file@v1 | |
with: | |
fileName: 'Key.snk' | |
encodedString: ${{ secrets.SIGNING_KEY }} | |
- name: Restore dependencies | |
run: | | |
dotnet nuget locals all --clear | |
dotnet restore $env:SolutionPath | |
- name: Build extension | |
run: dotnet build $env:SolutionPath | |
env: | |
SignAssembly: true | |
AssemblyOriginatorKeyFile: ${{ steps.write_sign_key_file.outputs.filePath }} | |
- name: Collect artifacts - nugets | |
uses: actions/upload-artifact@v2 | |
with: | |
name: NScenario-Nugets | |
path: '**/NScenario*.nupkg' |