-
Notifications
You must be signed in to change notification settings - Fork 2
60 lines (52 loc) · 1.6 KB
/
release.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
name: "Release"
on:
push:
tags:
- "*.*.*"
env:
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/nuget-packages
jobs:
release:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: NuGet cache
uses: actions/cache@v3
with:
path: ${{ env.NUGET_PACKAGES }}
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Restore
run: dotnet restore --locked-mode
- name: Build
run: dotnet build -c Release -o ".\publish" --no-restore
- name: Fetch previous release
continue-on-error: true
shell: pwsh
run: |
${{ env.NUGET_PACKAGES }}\clowd.squirrel\2.9.42\tools\Squirrel.exe github-down `
--repoUrl "https://github.com/rvost/DayzServerTools"
- name: Publish
shell: pwsh
run: |
${{ env.NUGET_PACKAGES }}\clowd.squirrel\2.9.42\tools\Squirrel.exe pack `
--framework net6 `
--packId "DayzServerTools" `
--packVersion "${{github.ref_name}}" `
--packAuthors "rvost" `
--packDir ".\publish"
- name: Create release
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
draft: true
files: |
Releases/RELEASES
Releases/*.exe
Releases/*.nupkg