Skip to content

ci: dual-ref SecureStorage fallback + deterministic tag version; publ… #1

ci: dual-ref SecureStorage fallback + deterministic tag version; publ…

ci: dual-ref SecureStorage fallback + deterministic tag version; publ… #1

Workflow file for this run

name: Publish NuGet Packages
# GENERAL release rule (AgentBridge/Graphene convention): a plain push is a code sync and
# publishes nothing. Publishing is explicit and versioned: push a tag v* (e.g. v1.26.09.09)
# and this workflow packs and publishes CommunicationChannel first, then EncryptedMessaging
# (EncryptedMessaging depends on CommunicationChannel), both at the tag version.
on:
push:
tags: ['v*']
permissions:
contents: read
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Pack CommunicationChannel
shell: bash
env:
VER: ${{ github.ref_name }}
run: |
VER="${VER#v}"
dotnet pack CommunicationChannel/CommunicationChannel.csproj -c Release -o ./out \
-p:Version="$VER" -p:SkipNuGetPush=true
- name: Push CommunicationChannel
shell: bash
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
run: |
if [ -z "$NUGET_API_KEY" ]; then
echo "::error::NUGET_API_KEY secret is not set on this repository — the package was NOT published."
exit 1
fi
dotnet nuget push ./out/CommunicationChannel.*.nupkg --api-key "$NUGET_API_KEY" --source https://api.nuget.org/v3/index.json --skip-duplicate
- name: Pack EncryptedMessaging
shell: bash
env:
VER: ${{ github.ref_name }}
run: |
VER="${VER#v}"
dotnet pack EncryptedMessaging/EncryptedMessaging.csproj -c Release -o ./out \
-p:Version="$VER" -p:SkipNuGetPush=true
- name: Push EncryptedMessaging
shell: bash
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
run: |
if [ -z "$NUGET_API_KEY" ]; then
echo "::error::NUGET_API_KEY secret is not set on this repository — the package was NOT published."
exit 1
fi
dotnet nuget push ./out/EncryptedMessaging.*.nupkg --api-key "$NUGET_API_KEY" --source https://api.nuget.org/v3/index.json --skip-duplicate