Skip to content

Commit 111848e

Browse files
author
Ibrahim Ethem Gursoy
committed
Update .NET workflows and add release workflow
- In dotnet.yml: - Removed redundant platform-specific publish steps - Simplified the build step - Added release.yml: - Workflow for building and publishing on tag pushes This commit optimizes the existing dotnet.yml workflow and introduces a new release.yml workflow for building and publishing releases on tag pushes.
1 parent 4c840fc commit 111848e

File tree

2 files changed

+39
-35
lines changed

2 files changed

+39
-35
lines changed

.github/workflows/dotnet.yml

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -31,38 +31,4 @@ jobs:
3131
- name: Restore dependencies
3232
run: dotnet restore
3333
- name: Build
34-
run: dotnet build --no-restore
35-
36-
- name: Publish for linux-x64
37-
run: dotnet publish -c Release -r linux-x64 --property:PublishDir=bin/publish_dist/linux-x64/ -p:PublishSingleFile=true --self-contained true
38-
- name: Publish for win-x64
39-
run: dotnet publish -c Release -r win-x64 --property:PublishDir=bin/publish_dist/win-x64/ -p:PublishSingleFile=true --self-contained true
40-
- name: Publish for linux-arm64
41-
run: dotnet publish -c Release -r linux-arm64 --property:PublishDir=bin/publish_dist/linux-arm64/ -p:PublishSingleFile=true --self-contained true
42-
- name: Publish for linux-arm
43-
run: dotnet publish -c Release -r linux-arm --property:PublishDir=bin/publish_dist/linux-arm/ -p:PublishSingleFile=true --self-contained true
44-
45-
- name: 'Upload Artifact for linux-x64'
46-
uses: actions/upload-artifact@v3
47-
with:
48-
name: linux-x64
49-
path: bin/publish_dist/linux-x64/
50-
retention-days: 5
51-
- name: 'Upload Artifact for win-x64'
52-
uses: actions/upload-artifact@v3
53-
with:
54-
name: win-x64
55-
path: bin/publish_dist/win-x64/
56-
retention-days: 5
57-
- name: 'Upload Artifact for linux-arm64'
58-
uses: actions/upload-artifact@v3
59-
with:
60-
name: linux-arm64
61-
path: bin/publish_dist/linux-arm64/
62-
retention-days: 5
63-
- name: 'Upload Artifact for linux-arm'
64-
uses: actions/upload-artifact@v3
65-
with:
66-
name: linux-arm
67-
path: bin/publish_dist/linux-arm/
68-
retention-days: 5
34+
run: dotnet build --no-restore

.github/workflows/release.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
release:
10+
name: Build and publish for all platforms
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
- name: Setup .NET
15+
uses: actions/setup-dotnet@v3
16+
with:
17+
dotnet-version: 7.0.x
18+
- name: Setup Node.js environment
19+
uses: actions/[email protected]
20+
- name: Install Node.js
21+
run: |
22+
cd wwwroot/js/
23+
npm install
24+
25+
- name: Build Node.js
26+
run: |
27+
cd wwwroot/js/
28+
npm run build
29+
30+
- name: Create dist
31+
run: make dist
32+
33+
- name: 'Upload Artifact'
34+
uses: actions/upload-artifact@v3
35+
with:
36+
name: publish_dist
37+
path: bin/publish_dist.tar.gz
38+
retention-days: 5

0 commit comments

Comments
 (0)