Forge
yamlc0b81713
1# Исходники AgentNotes.Core: репо AIGuiders.AgentNotes.Core (рядом с csproj — ../agent-notes-core).
2name Release
3
4on
5 push:
6 tags:
7 - 'v*'
8 workflow_dispatch:
9 inputs:
10 tag:
11 description: 'Тег для GitHub Release (например v0.1.0). Пусто — 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 ARTIFACT_PREFIX: AgentNotesMcp
22 ZIP_LABEL: ${{ github.ref_type == 'tag' && github.ref_name || ((github.event.inputs.tag || '') != '' && github.event.inputs.tag || format('manual-{0}', github.run_id)) }}
23
24jobs
25 publish:
26 runs-on: ubuntu-latest
27 steps:
28 - uses: actions/checkout@v4
29 with:
30 path: src/agent-notes-mcp
31
32 - uses: actions/checkout@v4
33 with:
34 repository: ${{ github.repository_owner }}/AIGuiders.AgentNotes.Core
35 path: src/agent-notes-core
36 token: ${{ github.token }}
37
38 - uses: actions/setup-dotnet@v4
39 with:
40 dotnet-version: ${{ env.DOTNET_VERSION }}
41
42 - name: Publish (self-contained) per RID
43 working-directory: src/agent-notes-mcp
44 run: |
45 set -euo pipefail
46 mkdir -p ../../dist
47 for rid in ${{ env.RELEASE_RIDS }}; do
48 out="../../publish/${rid}"
49 dotnet publish AgentNotesMcp.csproj -c Release -r "$rid" --self-contained true -o "$out"
50 (cd "$out" && zip -r "../../dist/${ARTIFACT_PREFIX}-${ZIP_LABEL}-${rid}.zip" .)
51 done
52 (cd "$GITHUB_WORKSPACE/dist" && sha256sum *.zip > SHA256SUMS)
53
54 - name: GitHub Release
55 if: ${{ github.ref_type == 'tag' || (github.event_name == 'workflow_dispatch' && (github.event.inputs.tag || '') != '') }}
56 uses: softprops/action-gh-release@v2
57 with:
58 tag_name: ${{ github.ref_type == 'tag' && github.ref_name || github.event.inputs.tag }}
59 generate_release_notes: true
60 files: |
61 dist/*.zip
62 dist/SHA256SUMS
63 env:
64 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
65
View only · write via MCP/CIDE