-
Notifications
You must be signed in to change notification settings - Fork 6
101 lines (81 loc) · 2.59 KB
/
ci.yml
File metadata and controls
101 lines (81 loc) · 2.59 KB
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
name: Build & Publish paracobNET Tools
on:
push:
branches:
- master
jobs:
build:
name: Build (matrix runtimes)
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
rid: [win-x64, linux-x64, osx-x64]
env:
DOTNET_NOLOGO: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET 10 SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: "10.x"
- name: Restore
run: dotnet restore
- name: Publish ParamXML
run: |
dotnet publish ParamXML/ParamXML.csproj \
-c Release \
-r ${{ matrix.rid }} \
--self-contained true \
-p:PublishSingleFile=true \
-o artifacts/ParamXML-${{ matrix.rid }}
- name: Publish prcEditor
run: |
dotnet publish prcEditor/prcEditor.csproj \
-c Release \
-r ${{ matrix.rid }} \
--self-contained true \
-p:PublishSingleFile=true \
-o artifacts/prcEditor-${{ matrix.rid }}
- name: Package artifacts
run: |
cd artifacts
zip -r ../ParamXML-${{ matrix.rid }}.zip ParamXML-${{ matrix.rid }}
zip -r ../prcEditor-${{ matrix.rid }}.zip prcEditor-${{ matrix.rid }}
- name: Upload artifacts (ParamXML)
uses: actions/upload-artifact@v4
with:
name: ParamXML-${{ matrix.rid }}
path: ParamXML-${{ matrix.rid }}.zip
- name: Upload artifacts (prcEditor)
uses: actions/upload-artifact@v4
with:
name: prcEditor-${{ matrix.rid }}
path: prcEditor-${{ matrix.rid }}.zip
release:
name: Release latest version of code
runs-on: ubuntu-latest
needs: build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download all build artifacts
uses: actions/download-artifact@v4
with:
path: ./artifacts
- name: List artifacts (for debug)
run: ls -R ./artifacts
- name: Ensure 'dotnet-10' release exists
run: |
if ! gh release view dotnet-10 >/dev/null 2>&1; then
gh release create dotnet-10 \
--title "paracobNET with .NET 10" \
--notes "Updated on every push to master"
fi
- name: Upload assets to 'dotnet-10' release
run: |
gh release upload dotnet-10 ./artifacts/**/ParamXML-*.zip ./artifacts/**/prcEditor-*.zip --clobber