chore: Add unit tests for BasicObject, DeepObject, and TemplateFact c… #24
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "CD: Release and Publish" | |
on: | |
workflow_dispatch: | |
push: | |
# Run on changes and let release-please create | |
# PRs for version bumps and new releases | |
paths: | |
- "**/*.cs" | |
- "**/*.csproj" | |
- "**/*.sln" | |
- ".github/workflows/cd_release_please.yml" | |
- ".release-please-manifest.json" | |
- "release-please-config.json" | |
jobs: | |
release-please: | |
name: Release Please | |
# Only run on main, after merge is completed | |
if: github.ref == 'refs/heads/main' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "16" | |
- name: Run release-please | |
uses: googleapis/release-please-action@v4 | |
id: release | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
bump-versions: | |
name: Set Version | |
if: github.ref != 'refs/heads/main' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Bump .NET package versions | |
uses: lekman/release-please-dotnet@v1 | |
with: | |
manifest: ".release-please-manifest.json" | |
branch: ${{ github.head_ref }} | |
publish: | |
name: Publish | |
# Only run on main, after merge is completed | |
if: github.ref == 'refs/heads/main' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: "9.0.x" | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build | |
- name: Publish | |
run: dotnet publish -c Release | |
- name: Publish to Nuget | |
run: dotnet nuget push **/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }} --skip-duplicate |