-
Notifications
You must be signed in to change notification settings - Fork 17
75 lines (70 loc) · 2.89 KB
/
Copy pathrelease.yml
File metadata and controls
75 lines (70 loc) · 2.89 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
name: Release
on:
push:
tags:
- v*
jobs:
build:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
path: registry
- name: Submodules
run: |
cd registry
git submodule update --force --recursive --init --remote
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
9.0.x
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 24
- name: Build
run: echo ${{ github.sha }} > Release.txt
- name: Test
run: cat Release.txt
- name: Build ClientApp
run: |
cd registry/Registry.Web/ClientApp
npm install && npm run build:prod
- name: Publish
run: |
cd registry
pwd
dotnet publish -p:PublishProfile=win-x64.pubxml Registry.Web
dotnet publish -p:PublishProfile=win-arm64.pubxml Registry.Web
dotnet publish -p:PublishProfile=linux-x64.pubxml Registry.Web
dotnet publish -p:PublishProfile=linux-arm.pubxml Registry.Web
dotnet publish -p:PublishProfile=linux-arm64.pubxml Registry.Web
dotnet publish -p:PublishProfile=osx-x64.pubxml Registry.Web
- name: Set version env
run: echo "VERSION=${GITHUB_REF_NAME}" >> $GITHUB_ENV
- name: Zip win-x64
run: cd registry/Registry.Web/bin/Release/net10.0/publish/win-x64/ && zip -r ../../../../../../../Registry-${{ env.VERSION }}-Win64.zip *
- name: Zip win-arm64
run: cd registry/Registry.Web/bin/Release/net10.0/publish/win-arm64/ && zip -r ../../../../../../../Registry-${{ env.VERSION }}-WinArm64.zip *
- name: Zip linux-x64
run: cd registry/Registry.Web/bin/Release/net10.0/publish/linux-x64/ && zip -r ../../../../../../../Registry-${{ env.VERSION }}-Linux64.zip *
- name: Zip linux-arm
run: cd registry/Registry.Web/bin/Release/net10.0/publish/linux-arm/ && zip -r ../../../../../../../Registry-${{ env.VERSION }}-LinuxArm.zip *
- name: Zip linux-arm64
run: cd registry/Registry.Web/bin/Release/net10.0/publish/linux-arm64/ && zip -r ../../../../../../../Registry-${{ env.VERSION }}-LinuxArm64.zip *
- name: Zip osx-x64
run: cd registry/Registry.Web/bin/Release/net10.0/publish/osx-x64/ && zip -r ../../../../../../../Registry-${{ env.VERSION }}-Osx64.zip *
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
Release.txt
LICENSE.md
Registry-${{ env.VERSION }}-Win64.zip
Registry-${{ env.VERSION }}-WinArm64.zip
Registry-${{ env.VERSION }}-Linux64.zip
Registry-${{ env.VERSION }}-LinuxArm.zip
Registry-${{ env.VERSION }}-LinuxArm64.zip
Registry-${{ env.VERSION }}-Osx64.zip