tentando deploy dnv #28
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: HotelSistemAPI | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
configuration: [Debug, Release] | |
runs-on: ubuntu-latest | |
env: | |
Solution_Name: HotelSistem | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Restore dependencies | |
run: dotnet restore | |
# Install the .NET Core workload | |
- name: Install .NET Core | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.204 | |
# Execute all unit tests in the solution | |
- name: Execute unit tests | |
run: dotnet test | |
- name: Build the application | |
run: dotnet build HotelSistem.sln --configuration ${{ matrix.configuration }} | |
- name: Publish the application | |
run: | | |
cd Hotel.Domain | |
dotnet publish -c Release -o api |