Update application to dotnet version and make it self contained #34
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: .NET Core | |
on: | |
push: | |
branches: master | |
tags: '**' | |
pull_request: | |
jobs: | |
build: | |
runs-on: [ubuntu-latest] | |
steps: | |
- name: Dump GitHub context | |
env: | |
GITHUB_CONTEXT: ${{ toJson(github) }} | |
run: echo "$GITHUB_CONTEXT" | |
- uses: actions/checkout@v1 | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 6.x | |
- name: Test with dotnet | |
run: dotnet test --configuration Release | |
publish: | |
runs-on: ubuntu-latest | |
needs: build | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 6.x | |
- name: Publish with dotnet | |
run: dotnet publish src/Cmf.Tools.TestDetector.Console/Cmf.Tools.TestDetector.Console.csproj --output win-64x/ -r win-x64 --self-contained --configuration Release /p:PublishSingleFile=true /p:UseAppHost=true /p:Version=$(git describe --tags --dirty) | |
- name: Create zip | |
run: zip -r '../win-64x.zip' * | |
working-directory: './win-64x' | |
- name: Publish Release | |
uses: fnkr/[email protected] | |
env: | |
GHR_PATH: /home/runner/work/dev-testdetector/dev-testdetector/win-64x.zip | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |