Skip to content

Commit f130bb4

Browse files
authored
Merge pull request #7 from colors-dev/feature/autoBldWF
Feature/auto bld wf
2 parents e42bdc1 + 16c327d commit f130bb4

2 files changed

Lines changed: 45 additions & 10 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,10 @@ jobs:
3030
- name: Setup .NET 8
3131
uses: actions/setup-dotnet@v4
3232
with:
33-
dotnet-version: '8.0.x'
33+
dotnet-version: "8.0.x"
3434

3535
- name: Restore
3636
run: msbuild Colors.Dev.sln /t:Restore /p:Configuration=${{ matrix.configuration }} /p:Platform=${{ matrix.platform }}
3737

3838
- name: Build
3939
run: msbuild Colors.Dev.sln /m /p:Configuration=${{ matrix.configuration }} /p:Platform=${{ matrix.platform }}
40-
41-
- name: Upload build artifacts
42-
uses: actions/upload-artifact@v4
43-
with:
44-
name: Colors.Dev-${{ matrix.configuration }}-${{ matrix.platform }}
45-
path: |
46-
**/bin/${{ matrix.platform }}/${{ matrix.configuration }}/**
47-
**/${{ matrix.platform }}/${{ matrix.configuration }}/**
48-
if-no-files-found: warn

.github/workflows/release.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
release:
13+
runs-on: windows-latest
14+
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Setup MSBuild
20+
uses: microsoft/setup-msbuild@v2
21+
22+
- name: Setup .NET 8
23+
uses: actions/setup-dotnet@v4
24+
with:
25+
dotnet-version: "8.0.x"
26+
27+
- name: Restore
28+
run: msbuild Colors.Dev.sln /t:Restore /p:Configuration=Release /p:Platform=x64
29+
30+
- name: Build
31+
run: msbuild Colors.Dev.sln /m /p:Configuration=Release /p:Platform=x64
32+
33+
- name: Package
34+
shell: pwsh
35+
run: |
36+
New-Item -ItemType Directory -Force -Path release | Out-Null
37+
Copy-Item "x64/Release/Colors.Dev.dll" -Destination release
38+
Copy-Item "x64/Release/Colors.Dev.lib" -Destination release
39+
Copy-Item "*.h" -Destination release -ErrorAction SilentlyContinue
40+
41+
- name: Create GitHub Release
42+
uses: softprops/action-gh-release@v2
43+
with:
44+
files: release/*

0 commit comments

Comments
 (0)