-
Notifications
You must be signed in to change notification settings - Fork 4
53 lines (43 loc) · 1.3 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
name: CI
on: [push]
jobs:
build:
strategy:
matrix:
platform: [win-x64, linux-x64]
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.0
- name: Build
run: dotnet publish -r ${{ matrix.platform }} -c Release --no-self-contained -p:PublishDir=../publish/${{ matrix.platform }}
- name: Upload
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.platform }}
path: publish/${{ matrix.platform }}/*
release:
name: Release
runs-on: ubuntu-latest
needs: build
if: startsWith(github.ref, 'refs/tag/v')
steps:
- name: Download release artifacts
uses: actions/download-artifact@v4
with:
path: x64
- name: Rename artifacts
run: |
mv x64/win-x64.zip toolbox-${{ github.ref_name }}-win-x64.zip
mv x64/linux-x64.zip toolbox-${{ github.ref_name }}-linux-x64.zip
- name: Create release draft
uses: softprops/action-gh-release@v1
with:
name: ${{ github.ref_name }}
draft: true
files: |
toolbox-${{ github.ref_name }}-win-x64.zip
toolbox-${{ github.ref_name }}-linux-x64.zip