-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (57 loc) · 1.84 KB
/
dotnet-desktop.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
strategy:
matrix:
configuration: [Release]
runs-on: windows-latest # For a list of available runner types, refer to
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on
env:
Solution_Name: LINKa.plays-launcher.sln # Replace with your solution name, i.e. MyWpfApp.sln.
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
# Install the .NET Core workload
- name: Install .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Add msbuild to PATH
uses: microsoft/[email protected]
- name: Restore packages
run: nuget restore $env:Solution_Path
- name: Build solution
run: msbuild $env:Solution_Path /t:Build /p:Configuration=Release
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: Release
path: LINKa.plays-launcher/bin/Release/net6.0-windows/
deploy:
needs: [build]
runs-on: ubuntu-20.04
steps:
- uses: actions/download-artifact@v3
with:
name: Release
path: launcher/
- name: Display structure of downloaded files
run: ls -R
working-directory: launcher
- name: Create zip file
run: zip -r launcher.zip launcher
- run: set -eu
- run: mkdir "$HOME/.ssh"
- run: echo "${{ secrets.SSH_KEY }}" > "$HOME/.ssh/key"
- run: chmod 600 "$HOME/.ssh/key"
- name: Deploy to server
env:
SSH_KEY: ${{ secrets.SSH_KEY }}
run: |
cat launcher.zip | ssh -i ~/.ssh/key -o StrictHostKeyChecking=no [email protected] dd of=/var/www/linka.su/linkaplay/launcher.zip