Skip to content

Commit 1c98ec8

Browse files
Update CI/CD documentation and workflows for multi-OS executable publishing
1 parent d70d6ff commit 1c98ec8

File tree

2 files changed

+19
-14
lines changed

2 files changed

+19
-14
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,17 @@ name: Release single-file (server.Stdio)
22

33
on:
44
workflow_dispatch:
5-
inputs:
6-
rid:
7-
description: ".NET Runtime Identifier (e.g., linux-x64, win-x64, osx-arm64)"
8-
required: true
9-
default: "linux-x64"
105
push:
116
tags:
127
- "v*"
138

149
jobs:
1510
publish:
1611
runs-on: ubuntu-latest
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
rid: [ linux-x64, win-x64, osx-arm64 ]
1716
steps:
1817
- name: Checkout
1918
uses: actions/checkout@v4
@@ -30,7 +29,7 @@ jobs:
3029
id: publish
3130
shell: bash
3231
env:
33-
RID: ${{ github.event.inputs.rid || 'linux-x64' }}
32+
RID: ${{ matrix.rid }}
3433
run: |
3534
set -euo pipefail
3635
PROJ="Server.Stdio/Server.Stdio.csproj"
@@ -63,6 +62,6 @@ jobs:
6362
- name: Upload executable artifact
6463
uses: actions/upload-artifact@v4
6564
with:
66-
name: io-aerosapce-mcp-${{ github.ref_name }}-${{ github.event.inputs.rid || 'linux-x64' }}
65+
name: io-aerosapce-mcp-${{ github.ref_name }}-${{ matrix.rid }}
6766
path: ${{ steps.publish.outputs.exe }}
6867
if-no-files-found: error

docs/CI-CD.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,27 @@
11
# CI/CD
22

33
- CI: Builds the repository on every push and PR (.github/workflows/ci.yml).
4-
- CD: Publishes a single-file executable for `server.Stdio` and uploads only that file as an artifact (.github/workflows/release.yml).
4+
- CD: Publishes single-file executables for `server.Stdio` for three OS targets in one run (.github/workflows/release.yml).
55

66
How to trigger deployment:
77
- Tag-based: push a tag like `v1.0.0`.
8-
- Manual: Actions → "Release single-file (server.Stdio)" → Run workflow and choose a RID (default `linux-x64`).
8+
- Manual: Actions → "Release single-file (server.Stdio)" → Run workflow (no inputs).
99

10-
Change target runtime:
11-
- Provide a different RID when running the workflow (examples: `linux-x64`, `win-x64`, `osx-arm64`).
10+
Targets built (one shot):
11+
- linux-x64, win-x64, osx-arm64
12+
13+
Change targets:
14+
- Edit the matrix in `.github/workflows/release.yml` (key `matrix.rid`) to add/remove RIDs.
1215

1316
Result:
14-
- Artifact name: `io-aerosapce-mcp-<tag or branch>-<RID>`
15-
- Contains only the produced executable.
17+
- Three artifacts:
18+
- `io-aerosapce-mcp-<tag or branch>-linux-x64`
19+
- `io-aerosapce-mcp-<tag or branch>-win-x64`
20+
- `io-aerosapce-mcp-<tag or branch>-osx-arm64`
21+
- Each contains only the produced executable.
1622

1723
Note on cross-publishing (ubuntu-latest):
18-
- Yes, you can generate Windows (.exe) or macOS binaries from Ubuntu by setting RID to `win-x64` or `osx-arm64`.
24+
- Yes, Windows and macOS binaries are generated on Ubuntu by setting the RID.
1925
- macOS outputs will be unsigned; signing/notarization must happen on macOS if required.
2026

2127
Local single-file publish examples:

0 commit comments

Comments
 (0)