Update dotnet.yml #190
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: .NET | |
on: | |
push: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v2 | |
- name: Set up .NET | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 8.0.x | |
- name: Install dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --configuration Release --no-restore | |
- name: Test | |
uses: zyborg/dotnet-tests-report@v1.3.0 | |
with: | |
project_path: FrEee.Tests/FrEee.Tests.csproj | |
no_restore: true # we already restored above | |
msbuild_configuration: Release | |
msbuild_verbosity: normal # q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic]. | |
report_name: TestReport_${{github.sha}}_$NOW | |
report_title: Test Report | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
skip_check_run: false | |
set_check_status_from_test_outcome: false # true = fail the build if tests fail | |
#trx_xsl_path: # optional | |
- name: Create release tag | |
id: createReleaseTag | |
uses: 2428392/gh-truncate-string-action@v1.0.0 | |
with: | |
stringToTruncate: ${{github.sha}} | |
maxLength: 10 | |
- name: List files | |
run: ls -s .\FrEee.UI.WinForms\bin\Release\net6.0-windows7.0 | |
- name: Prepare files for zipping | |
run: | | |
cd FrEee.UI.WinForms/bin/Release | |
ren net8.0-windows7.0 FrEee | |
shell: cmd | |
- name: Zip assets | |
uses: papeloto/action-zip@v1 | |
with: | |
files: ./FrEee.UI.WinForms/bin/Release | |
dest: FrEee-binary-${{steps.createReleaseTag.outputs.string}}.zip | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: ${{steps.createReleaseTag.outputs.string}} | |
files: FrEee-binary-*.zip | |
draft: false | |
prerelease: true | |
name: Auto-Build Release ${{steps.createReleaseTag.outputs.string}} | |
fail_on_unmatched_files: true | |
token: ${{ secrets.GITHUB_TOKEN }} |