Skip to content

Commit 10e2588

Browse files
committed
Merge branch 'master' of github.com:xCynDev/Xenium
2 parents 48f570a + e507d4c commit 10e2588

1 file changed

Lines changed: 82 additions & 0 deletions

File tree

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: Release Version
2+
on:
3+
push:
4+
tags: 'v*.*.*'
5+
6+
7+
jobs:
8+
build:
9+
strategy:
10+
matrix:
11+
os:
12+
- runner: 'windows-latest'
13+
rid: 'win'
14+
- runner: 'ubuntu-latest'
15+
rid: 'linux'
16+
17+
name: Publish .NET Native AOT (${{matrix.os.rid}})
18+
runs-on: ${{matrix.os.runner}}
19+
20+
steps:
21+
# Get the ref that triggered this workflow.
22+
- name: Checkout Xenium
23+
uses: actions/checkout@v4
24+
25+
# CD to the workspace
26+
- name: CD Workspace
27+
run: cd $GITHUB_WORKSPACE
28+
29+
# Install .NET 9
30+
- name: Install .NET 9 SDK
31+
uses: actions/setup-dotnet@v4
32+
with:
33+
dotnet-version: 9.0.x
34+
35+
# Build Xenium
36+
- name: Build Xenium
37+
run: dotnet publish -c Release --os ${{matrix.os.rid}} -o RunnerBuildOutput
38+
39+
# Archive the executable and PDB together.
40+
- name: Archive artifacts
41+
uses: ihiroky/archive-action@v1
42+
with:
43+
root_dir: $GITHUB_WORKSPACE/RunnerBuildOutput/
44+
file_path: $GITHUB_WORKSPACE/Xenium-${{matrix.os.rid}}.zip
45+
verbose: true
46+
47+
- name: Upload artifacts
48+
uses: actions/upload-artifact@v4
49+
with:
50+
name: Xenium-${{matrix.os.rid}}
51+
path: $GITHUB_WORKSPACE/Xenium-${{matrix.os.rid}}.zip
52+
53+
release:
54+
name: Release Xenium ${{github.ref_name}}
55+
needs: build
56+
runs-on: ubuntu-latest
57+
steps:
58+
# Make a directory to download artifacts to
59+
- name: Make artifacts directory
60+
run: mkdir artifacts
61+
62+
# Download artifacts to artifacts folder.
63+
- name: Download artifacts
64+
uses: actions/download-artifact@v4
65+
with:
66+
path: artifacts
67+
pattern: Xenium-*
68+
merge-multiple: true
69+
70+
# Make release with artifacts
71+
- name: Make release
72+
uses: softprops/action-gh-release@v2
73+
with:
74+
files: |
75+
artifacts/Xenium-linux.zip
76+
artifacts/Xenium-win.zip
77+
fail_on_unmatched_files: true
78+
79+
80+
81+
82+

0 commit comments

Comments
 (0)