Skip to content

Update build.yml

Update build.yml #20

Workflow file for this run

# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: Build
on:
workflow_dispatch:
push:
jobs:
Build_Test_Deploy:
runs-on: windows-latest
environment: test
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal
- name: Publish
run: dotnet publish HamEvent/HamEvent.csproj --configuration Release --framework net7.0 --output ./publish --runtime win-x64 --self-contained true -p:PublishTrimmed=false -p:PublishSingleFile=false
- name: Debug
run: |
echo "::group::Debug"
echo "::ComputerName-${{ secrets.SERVER_COMPUTER_NAME }}"
echo "::WebsiteName-${{ secrets.WEBSITE_NAME }}"
echo "::endgroup::"
- name: Deploy
uses: rasmusbuchholdt/[email protected]
with:
website-name: ${{ secrets.WEBSITE_NAME }}
server-computer-name: ${{ secrets.SERVER_COMPUTER_NAME }}
server-username: ${{ secrets.SERVER_USERNAME }}
server-password: ${{ secrets.SERVER_PASSWORD }}
skip-directory-path: '\\App_Data'