Skip to content

Commit 9afc3bc

Browse files
authored
Github actions (trigger-segfault#6)
* Add release action * Publish in Release * Add CI build action
1 parent 94c4ba0 commit 9afc3bc

File tree

2 files changed

+61
-0
lines changed

2 files changed

+61
-0
lines changed

,github/ci.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: CI Build
2+
on: [push]
3+
jobs:
4+
build:
5+
runs-on: windows-latest
6+
strategy:
7+
matrix:
8+
dotnet-version: [ '5.0.x' ]
9+
steps:
10+
- uses: actions/checkout@v2
11+
- name: Setup .NET SDK ${{ matrix.dotnet }}
12+
uses: actions/setup-dotnet@v1.7.2
13+
with:
14+
dotnet-version: ${{ matrix.dotnet-version }}
15+
- name: Install dependencies
16+
run: dotnet restore
17+
- name: Build (.NET)
18+
run: dotnet build --no-restore -c Release

,github/release.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Release
2+
on:
3+
release:
4+
types: [created]
5+
workflow_dispatch:
6+
jobs:
7+
build:
8+
runs-on: windows-latest
9+
strategy:
10+
matrix:
11+
dotnet-version: [ '5.0.x' ]
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Setup .NET SDK ${{ matrix.dotnet }}
15+
uses: actions/setup-dotnet@v1.7.2
16+
with:
17+
dotnet-version: ${{ matrix.dotnet-version }}
18+
- name: Install dependencies
19+
run: dotnet restore
20+
21+
- name: Publish (.NET)
22+
run: dotnet publish --no-restore -c Release --no-self-contained -o pub/net/
23+
- name: Upload .NET build
24+
uses: actions/upload-artifact@v2
25+
with:
26+
name: windirstat.net
27+
path: pub/net/*.*
28+
29+
- name: Publish (x86)
30+
run: dotnet publish --no-restore -c Release -r win-x86 -o pub/x86/
31+
- name: Upload x86 build
32+
uses: actions/upload-artifact@v2
33+
with:
34+
name: windirstat.net-x86
35+
path: pub/x86/*.*
36+
37+
- name: Publish (x64)
38+
run: dotnet publish --no-restore -c Release -r win-x64 -o pub/x64/
39+
- name: Upload x64 build
40+
uses: actions/upload-artifact@v2
41+
with:
42+
name: windirstat.net-x64
43+
path: pub/x64/*.*

0 commit comments

Comments
 (0)