Skip to content

Ajuste | Github Workflow #6

Ajuste | Github Workflow

Ajuste | Github Workflow #6

name: .NET Core CI
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
strategy:
matrix:
configuration: [Release]
runs-on: windows-latest
env:
Solution_Name: ExplorandoMarte.sln # Nome da solução
Test_Project_Path: ExplorandoMarte.Tests/ExplorandoMarte.Tests.csproj # Caminho para o projeto de testes
Publish_Directory: ExplorandoMarte/publish # Diretório de publicação
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: '8.0.x'
- name: Restore dependencies
run: dotnet restore ${{ env.Solution_Name }}
- name: Build
run: dotnet build ${{ env.Solution_Name }} --configuration ${{ matrix.configuration }} --no-restore
- name: Run tests
run: dotnet test ${{ env.Test_Project_Path }} --configuration ${{ matrix.configuration }} --no-restore --verbosity normal
- name: Publish
run: dotnet publish ${{ env.Solution_Name }} --configuration ${{ matrix.configuration }} --output ${{ env.Publish_Directory }}
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: Published_EXE_${{ github.run_id }} env.
path: ${{ env.Publish_Directory }}