-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (40 loc) · 1.1 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
name: .NET
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore -r linux-x64
- name: Build
run: |
dotnet publish -r linux-x64 -p:PublishSingleFile=true -p:Configuration=Release --no-self-contained
cd ..
- name: Upload Binary
uses: actions/upload-artifact@v4
with:
name: linux
path: bin/Release/net6.0/linux-x64/publish/
release:
needs: [build]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags')
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: ./artifacts
- name: Zip
run: |
chmod +x ./artifacts/linux/ModlinksShaVerifier
zip -jr linux.zip ./artifacts/linux/*
- name: Create release if a new tag is pushed
uses: softprops/action-gh-release@v2
with:
files: |
./linux.zip