Skip to content

Add EmptyContent template to ObservableForEach #4

Add EmptyContent template to ObservableForEach

Add EmptyContent template to ObservableForEach #4

Workflow file for this run

name: Publish to NuGet
on:
push:
tags:
- 'observable/*'
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Set version from tag
id: version
run: |
VERSION="${GITHUB_REF#refs/tags/observable/}"
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
- name: Update version in csproj files
run: |
VERSION="${{ steps.version.outputs.VERSION }}"
find . -name "*.csproj" -exec sed -i "s/<Version>.*<\/Version>/<Version>$VERSION<\/Version>/" {} \;
find . -name "*.csproj" -exec sed -i "s/<AssemblyVersion>.*<\/AssemblyVersion>/<AssemblyVersion>$VERSION<\/AssemblyVersion>/" {} \;
find . -name "*.csproj" -exec sed -i "s/<FileVersion>.*<\/FileVersion>/<FileVersion>$VERSION<\/FileVersion>/" {} \;
- name: Restore
run: dotnet restore Source/ModelingEvolution.Observable.sln
- name: Build
run: dotnet build Source/ModelingEvolution.Observable.sln --configuration Release --no-restore
- name: Pack Observable
run: dotnet pack Source/ModelingEvolution.Observable/ModelingEvolution.Observable.csproj --configuration Release --no-build --output ./nupkg
- name: Pack Observable.Blazor
run: dotnet pack Source/ModelingEvolution.Observable.Blazor/ModelingEvolution.Observable.Blazor.csproj --configuration Release --no-build --output ./nupkg
- name: List packages
run: ls -la ./nupkg/
- name: Push to NuGet
run: |
for pkg in ./nupkg/*.nupkg; do
dotnet nuget push "$pkg" \
--api-key ${{ secrets.NUGET_API_KEY }} \
--source https://api.nuget.org/v3/index.json \
--skip-duplicate
done