-
Notifications
You must be signed in to change notification settings - Fork 3
97 lines (79 loc) · 2.55 KB
/
release.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
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
name: 🚀 Release
on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+"
jobs:
build-win:
name: 📯 Publish 🪟
runs-on: windows-latest
defaults:
run:
working-directory: src/
steps:
- name: 🛒 Checkout
uses: actions/checkout@v3
- name: 1️⃣2️⃣3️⃣ Set VERSION
uses: ./.github/actions/version
- name: 💬 Release notes
run: cat "../release-notes/${{ env.VERSION }}.md"
- name: 🟣 Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: 🧪 Test
run: dotnet test --verbosity normal
- name: 📯 Publish 🪟
run: dotnet publish KiCadDbLib/KiCadDbLib.csproj -c Release --sc -r win-x64 -p:Version=${{ env.VERSION }} -o ../publish/win-x64
- name: 📤 Upload
uses: actions/upload-artifact@v3
with:
name: win-x64
path: publish/win-x64
build:
name: 🚀 Release
runs-on: ubuntu-latest
needs: build-win
defaults:
run:
working-directory: src/
steps:
- name: 🛒 Checkout
uses: actions/checkout@v3
- name: 1️⃣2️⃣3️⃣ Set VERSION
uses: ./.github/actions/version
- name: 💬 Release notes
run: cat "../release-notes/${{ env.VERSION }}.md"
- name: 🟣 Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: 🧪 Test
run: dotnet test --verbosity normal
- name: 🪟 Download
uses: ./.github/actions/download-delete-artifact
with:
name: win-x64
path: publish/win-x64
- name: 🪟 Pack
run: |
cd ../publish/win-x64
zip -r ../KiCad-Db-Lib-win-x64.zip .
- name: 📺 Publish
run: |
dotnet publish KiCadDbLib/KiCadDbLib.csproj -c Release --sc -r linux-x64 -p:Version=$VERSION -o ../publish/linux-x64
cd ../publish/linux-x64
tar -cvzf ../KiCad-Db-Lib-linux-x64.tar.gz *
- name: 🍏 Publish
run: |
dotnet publish KiCadDbLib/KiCadDbLib.csproj -c Release --sc -r osx-x64 -p:Version=$VERSION -o ../publish/osx-x64
cd ../publish/osx-x64
tar -cvzf ../KiCad-Db-Lib-macOS.tar.gz *
- name: 🚀 Release
uses: softprops/action-gh-release@v1
with:
body_path: release-notes/${{ env.VERSION }}.md
files: |
publish/KiCad-Db-Lib-win-x64.zip
publish/KiCad-Db-Lib-linux-x64.tar.gz
publish/KiCad-Db-Lib-macOS.tar.gz