Forge
yaml9332cf7c
1# MCP-EXE; HybridCodebaseIndex.Core с NuGet (AIGuiders.HybridCodebaseIndex.Core).
2name Release MCP
3
4on
5 push:
6 tags:
7 - 'v*'
8 workflow_dispatch:
9 inputs:
10 tag:
11 description: 'Тег для GitHub Release. Пусто — ZIP …-manual-<run_id>-… без релиза.'
12 required: false
13 type: string
14
15permissions
16 contents: write
17
18env
19 DOTNET_VERSION: '10.0.x'
20 RELEASE_RIDS: 'win-x64 linux-x64 osx-x64 osx-arm64'
21 PROJECT: HybridCodebaseIndex.Mcp/HybridCodebaseIndex.Mcp.csproj
22 ARTIFACT_PREFIX: HybridCodebaseIndex.Mcp
23 ZIP_LABEL: ${{ github.ref_type == 'tag' && github.ref_name || ((github.event.inputs.tag || '') != '' && github.event.inputs.tag || format('manual-{0}', github.run_id)) }}
24
25jobs
26 publish:
27 runs-on: ubuntu-latest
28 steps:
29 - uses: actions/checkout@v4
30
31 - uses: actions/setup-dotnet@v4
32 with:
33 dotnet-version: ${{ env.DOTNET_VERSION }}
34
35 - name: Publish (self-contained) per RID
36 run: |
37 set -euo pipefail
38 mkdir -p dist
39 for rid in ${{ env.RELEASE_RIDS }}; do
40 out="publish/${rid}"
41 dotnet publish "$PROJECT" -c Release -r "$rid" --self-contained true -o "$out"
42 (cd "$out" && zip -r "../../dist/${ARTIFACT_PREFIX}-${ZIP_LABEL}-${rid}.zip" .)
43 done
44 (cd dist && sha256sum *.zip > SHA256SUMS)
45
46 - name: GitHub Release
47 if: ${{ github.ref_type == 'tag' || (github.event_name == 'workflow_dispatch' && (github.event.inputs.tag || '') != '') }}
48 uses: softprops/action-gh-release@v2
49 with:
50 tag_name: ${{ github.ref_type == 'tag' && github.ref_name || github.event.inputs.tag }}
51 generate_release_notes: true
52 files: |
53 dist/*.zip
54 dist/SHA256SUMS
55 env:
56 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
57
View only · write via MCP/CIDE