forked from cmer81/MapDownloader
-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (53 loc) · 1.29 KB
/
buildrel.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
name: Build
on:
push:
paths-ignore:
- '.gitignore'
- 'LICENSE'
- 'README.md'
- 'maps.csv'
branches:
- master
tags:
- '*'
pull_request:
paths-ignore:
- '.gitignore'
- 'LICENSE'
- 'README.md'
- 'maps.csv'
jobs:
Build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v3
with:
dotnet-version: '7.x'
dotnet-quality: 'ga'
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet publish -c Release
- name: Prepare artifacts
run: |
robocopy MapDownloader\bin\Release\net7.0-windows\win-x64\publish\ artifacts MapDownloader.exe /r:0 /w:0
If ($LastExitCode -le 7) { $LastExitCode = 0 }
- uses: actions/upload-artifact@v3
with:
name: Release
path: artifacts
Release:
name: Release
if: startsWith(github.ref, 'refs/tags/')
needs: Build
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
- name: Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: 'Release/MapDownloader.exe'
tag: ${{ github.ref }}