Add qodana CI checks #40
Workflow file for this run
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: | |
pull_request: | |
types: [opened, synchronize, reopened, labeled, edited] | |
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" | |
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: Publish to Nuget | |
run: | | |
dotnet restore | |
dotnet build | |
dotnet publish -c Release | |
dotnet nuget push **/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }} --skip-duplicate |