Skip to content

chore: test md template #161

chore: test md template

chore: test md template #161

Workflow file for this run

name: dotnet build
# run on both branch push and tag push
on:
workflow_dispatch:
push:
branches: ["main"]
pull_request:
branches: ["main"]
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_NOLOGO: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
NUGET_XMLDOC_MODE: skip
# colour output
DOTNET_SYSTEM_CONSOLE_ALLOW_ANSI_COLOR_REDIRECTION: 1
TERM: xterm
jobs:
dotnet-console:
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
- uses: actions/checkout@v4
- name: dotnet executable path before setup-dotnet (/usr/bin/dotnet)
run: command -v dotnet
- name: dotnet version under /usr/share/dotnet/sdk
run: ls /usr/share/dotnet/sdk
- name: dotnet executable version before setup-dotnet
run: dotnet --version
- name: dotnet sdks before setup-dotnet
run: dotnet --list-sdks
- uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: dotnet executable path after setup-dotnet (/usr/share/dotnet/dotnet)
run: command -v dotnet
- name: dotnet version under /usr/share/dotnet/sdk
run: ls /usr/share/dotnet/sdk
- name: dotnet version after setup-dotnet
run: ls -l "${DOTNET_ROOT}/sdk"
- name: dotnet executable version after setup-dotnet
run: dotnet --version
- name: dotnet sdks after setup-dotnet
run: dotnet --list-sdks
- name: dotnet build
run: dotnet build ./src/dotnet/console/ -c Debug
- name: dotnet test
run: dotnet test ./src/dotnet/console-tests/ -c Debug --logger GitHubActions
- name: dotnet publish
run: dotnet publish ./src/dotnet/console/ -c Debug -o ./out/dotnet-console
- uses: actions/upload-artifact@v3
with:
name: dotnet-console
path: ./out/dotnet-console
retention-days: 1
dotnet-console-container:
runs-on: ubuntu-latest
timeout-minutes: 3
container:
image: mcr.microsoft.com/dotnet/sdk:6.0
steps:
- uses: actions/checkout@v4
- name: dotnet build
run: dotnet build ./src/dotnet/console/ -c Debug
- name: dotnet test
run: dotnet test ./src/dotnet/console-tests/ -c Debug --logger GitHubActions
- name: dotnet publish
run: dotnet publish ./src/dotnet/console/ -c Debug -o ./out/dotnet-console-container
- uses: actions/upload-artifact@v3
with:
name: dotnet-console-container
path: ./out/dotnet-console-container
retention-days: 1
ls:
runs-on: ubuntu-latest
timeout-minutes: 3
needs:
- dotnet-console
- dotnet-console-container
steps:
- uses: actions/download-artifact@v3
- run: ls -lR