forked from sta/websocket-sharp
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (39 loc) · 1.25 KB
/
pr.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
name: WebSocketSharp PRs
on: pull_request
jobs:
build:
runs-on: ubuntu-latest
env:
ASSEMBLY_VERSION: '1.0.0.${{ github.run_number }}'
ARTIFACT_NAME: 'WebSocketSharp.1.0.0.${{ github.run_number }}'
outputs:
artifact_name: '${{ env.ARTIFACT_NAME }}'
nupkg_base_name: 'AscensionGameDev.WebSocketSharp.${{ env.ASSEMBLY_VERSION }}-beta'
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.*
- name: Restore dependencies
run: dotnet restore
- id: build_debug
name: Build (Debug)
run: dotnet build --no-restore -c Debug -p:VersionPrefix=$ASSEMBLY_VERSION -p:VersionSuffix=beta-debug
- id: build_release
name: Build (Release)
run: dotnet build --no-restore -c Release -p:VersionPrefix=$ASSEMBLY_VERSION -p:VersionSuffix=beta
- name: Upload build artifacts
uses: actions/[email protected]
with:
name: '${{ env.ARTIFACT_NAME }}'
path: 'WebSocketSharp/bin/*'
if-no-files-found: error
retention-days: 1
test:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v2
- name: Tests (main)
run: dotnet test --verbosity normal