forked from SubmergedAmongUs/Submerged
-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (61 loc) · 2.01 KB
/
ci.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
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'
- name: Restore dependencies
run: dotnet restore Submerged/Submerged.csproj
- name: Build Debug
run: dotnet build --configuration Debug
- name: Build Release
run: dotnet build --configuration Release
- name: Upload Debug Artifact
uses: actions/upload-artifact@v2
with:
name: submerged-debug
path: Submerged/bin/Debug/net6.0/Submerged.dll
- name: Upload Release Artifact
uses: actions/upload-artifact@v2
with:
name: submerged-release
path: Submerged/bin/Release/net6.0/Submerged.dll
- name: Setup Draft Release
if: github.ref == 'refs/heads/main'
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.run_number }}
draft: true
prerelease: false
- name: Upload Debug Artifact to Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./Submerged/bin/Debug/net6.0/Submerged.dll
asset_name: submerged-debug.dll
asset_content_type: application/octet-stream
- name: Upload Release Artifact to Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./Submerged/bin/Release/net6.0/Submerged.dll
asset_name: submerged-release.dll
asset_content_type: application/octet-stream