Skip to content

Ci cd

Ci cd #3

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: .NET
on:
push:
branches: [ "main" ]
pull_request:
types: [opened, reopened, edited]
jobs:
build-publish-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Restore dependencies
run: dotnet restore ./ShareClipbrd/ShareClipbrd.sln
- name: Build
run: dotnet build ./ShareClipbrd/ShareClipbrd.sln --no-restore
- name: Test
run: dotnet test ./ShareClipbrd/ShareClipbrd.sln --no-build --verbosity normal
- name: Publish
run: |
dotnet publish ./ShareClipbrd/ShareClipbrdApp/ShareClipbrdApp.csproj -c PublishRelease --no-self-contained --use-current-runtime -o ./out/win/TutoProxy.Server --os win -p:PublishProfile=FolderProfile -p:DebugType=None -p:DebugSymbols=false
dotnet publish ./ShareClipbrd/ShareClipbrdApp/ShareClipbrdApp.csproj -c PublishRelease --no-self-contained --use-current-runtime -o ./out/linux/TutoProxy.Server --os linux -p:PublishProfile=FolderProfile -p:DebugType=None
- name: Deploy Win
uses: actions/upload-artifact@v3
with:
name: win
path: ./out/win/ShareClipbrdApp/ShareClipbrdApp.exe
retention-days: 30
- name: Deploy Linux
uses: actions/upload-artifact@v3
with:
name: linux
path: ./out/linux/ShareClipbrdApp/ShareClipbrdApp
retention-days: 30