-
-
Notifications
You must be signed in to change notification settings - Fork 328
59 lines (47 loc) · 1.55 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
name: CI
on: [push, pull_request]
jobs:
build:
strategy:
matrix:
configuration: [Debug, Release]
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Publish
run: dotnet publish -p:PublishSingleFile=true -p:CommitHash=${{ github.sha }} -p:CommitRef=${{ github.ref_type }}/${{ github.ref_name }} -r win-x64 -c ${{ matrix.configuration }} --self-contained false .\Bloxstrap\Bloxstrap.csproj
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: Bloxstrap (${{ matrix.configuration }})
path: |
.\Bloxstrap\bin\${{ matrix.configuration }}\net6.0-windows\win-x64\publish\*
release:
needs: build
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Download x64 release artifact
uses: actions/download-artifact@v4
with:
name: Bloxstrap (Release)
path: x64
- name: Rename binaries
run: |
mv x64/Bloxstrap.exe Bloxstrap-${{ github.ref_name }}.exe
- name: Release
uses: softprops/action-gh-release@v2
with:
draft: true
files: |
Bloxstrap-${{ github.ref_name }}.exe
name: Bloxstrap ${{ github.ref_name }}