-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (48 loc) · 1.18 KB
/
dotnet.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
name: .NET
on:
push:
branches: ["*"]
tags: ["*"]
pull_request:
branches: ["*"]
env:
SAPISID: ${{ secrets.SAPISID }}
PSID: ${{ secrets.PSID }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal
publish:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 8.0.x
- name: publish win
run: dotnet publish -c Release -r win-x64 --no-self-contained
- name: install zip
run: sudo apt install zip
- name: zip win
run: zip -r Tobi-windows.zip DiscordBot/bin/Release/net7.0/win-x64/publish
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
Tobi-windows.zip
Tobi-mac.zip
Tobi-ubuntu.zip