-
Notifications
You must be signed in to change notification settings - Fork 20
Create release.yml #868
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Create release.yml #868
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,271 @@ | ||||||||||||||||||||||||||||||||||||||
| name: Release | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| on: | ||||||||||||||||||||||||||||||||||||||
| push: | ||||||||||||||||||||||||||||||||||||||
| branches: | ||||||||||||||||||||||||||||||||||||||
| - main | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| concurrency: | ||||||||||||||||||||||||||||||||||||||
| group: release | ||||||||||||||||||||||||||||||||||||||
| cancel-in-progress: false | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||||||||||||||||
| DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true | ||||||||||||||||||||||||||||||||||||||
| DOTNET_NOLOGO: true | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||||||||||||||||
| release: | ||||||||||||||||||||||||||||||||||||||
| name: Build Β· Test Β· Package Β· Release | ||||||||||||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||||||||||
| permissions: | ||||||||||||||||||||||||||||||||||||||
| contents: write | ||||||||||||||||||||||||||||||||||||||
| pull-requests: read | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| # ββ Projects to package (mirrors AppVeyor $PROJECTS) ββββββββββββββββββββββ | ||||||||||||||||||||||||||||||||||||||
| # Update this list if you add or remove sub-projects. | ||||||||||||||||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||||||||||||||||
| PACKAGE_PROJECTS: "Configuration ElasticSearch Elmah EventLog I18n.PtBr Log4Net RabbitMQ Redis Utils" | ||||||||||||||||||||||||||||||||||||||
| TARGET_FRAMEWORKS: "netstandard2.0 netstandard2.1 net6.0 net9.0" | ||||||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sync
Suggested fix- TARGET_FRAMEWORKS: "netstandard2.0 netstandard2.1 net6.0 net9.0"
+ TARGET_FRAMEWORKS: "netstandard2.0 netstandard2.1 net8.0 net9.0"π€ Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| # ββ CouchDB service container ββββββββββββββββββββββββββββββββββββββββββββββ | ||||||||||||||||||||||||||||||||||||||
| services: | ||||||||||||||||||||||||||||||||||||||
| couchdb: | ||||||||||||||||||||||||||||||||||||||
| image: couchdb:3.3.3 | ||||||||||||||||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||||||||||||||||
| COUCHDB_USER: Admin | ||||||||||||||||||||||||||||||||||||||
| COUCHDB_PASSWORD: myP@ssw0rd | ||||||||||||||||||||||||||||||||||||||
| ports: | ||||||||||||||||||||||||||||||||||||||
| - 5984:5984 | ||||||||||||||||||||||||||||||||||||||
| options: >- | ||||||||||||||||||||||||||||||||||||||
| --health-cmd "curl -sf http://localhost:5984/_up" | ||||||||||||||||||||||||||||||||||||||
| --health-interval 10s | ||||||||||||||||||||||||||||||||||||||
| --health-timeout 5s | ||||||||||||||||||||||||||||||||||||||
| --health-retries 10 | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||||||||
| # ββ Checkout βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | ||||||||||||||||||||||||||||||||||||||
| - name: Checkout | ||||||||||||||||||||||||||||||||||||||
| uses: actions/checkout@v4 | ||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||
| fetch-depth: 0 | ||||||||||||||||||||||||||||||||||||||
| token: ${{ secrets.GITHUB_TOKEN }} | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| # ββ Toolchain ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | ||||||||||||||||||||||||||||||||||||||
| - name: Setup .NET 10 | ||||||||||||||||||||||||||||||||||||||
| uses: actions/setup-dotnet@v4 | ||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||
| dotnet-version: "10.0.x" | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| - name: Setup Java 21 | ||||||||||||||||||||||||||||||||||||||
| uses: actions/setup-java@v4 | ||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||
| distribution: temurin | ||||||||||||||||||||||||||||||||||||||
| java-version: "21" | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| # ββ GitVersion βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | ||||||||||||||||||||||||||||||||||||||
| - name: Install GitVersion | ||||||||||||||||||||||||||||||||||||||
| uses: gittools/actions/gitversion/setup@v3 | ||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||
| versionSpec: "6.x" | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| - name: Determine version | ||||||||||||||||||||||||||||||||||||||
| id: gitversion | ||||||||||||||||||||||||||||||||||||||
| uses: gittools/actions/gitversion/execute@v3 | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| - name: Patch .props files with computed version | ||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||
| VERSION="${{ steps.gitversion.outputs.semVer }}" | ||||||||||||||||||||||||||||||||||||||
| echo "Patching version β $VERSION" | ||||||||||||||||||||||||||||||||||||||
| find . -name "*.props" -print0 | xargs -0 sed -i \ | ||||||||||||||||||||||||||||||||||||||
| -e "s|<Version>[^<]*</Version>|<Version>$VERSION</Version>|g" \ | ||||||||||||||||||||||||||||||||||||||
| -e "s|<PackageVersion>[^<]*</PackageVersion>|<PackageVersion>$VERSION</PackageVersion>|g" \ | ||||||||||||||||||||||||||||||||||||||
| -e "s|<AssemblyVersion>[^<]*</AssemblyVersion>|<AssemblyVersion>$VERSION</AssemblyVersion>|g" \ | ||||||||||||||||||||||||||||||||||||||
| -e "s|<FileVersion>[^<]*</FileVersion>|<FileVersion>$VERSION</FileVersion>|g" \ | ||||||||||||||||||||||||||||||||||||||
| -e "s|<InformationalVersion>[^<]*</InformationalVersion>|<InformationalVersion>$VERSION</InformationalVersion>|g" | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| # ββ Resolve solution name βββββββββββββββββββββββββββββββββββββββββββββββββ | ||||||||||||||||||||||||||||||||||||||
| - name: Resolve solution name | ||||||||||||||||||||||||||||||||||||||
| id: solution | ||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||
| SLN=$(find . -maxdepth 2 -name "*.sln" | head -1 | xargs basename -s .sln) | ||||||||||||||||||||||||||||||||||||||
| echo "name=$SLN" >> "$GITHUB_OUTPUT" | ||||||||||||||||||||||||||||||||||||||
| echo "Solution: $SLN" | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| # ββ Install global tools ββββββββββββββββββββββββββββββββββββββββββββββββββ | ||||||||||||||||||||||||||||||||||||||
| - name: Install dotnet-sonarscanner | ||||||||||||||||||||||||||||||||||||||
| run: dotnet tool install --global dotnet-sonarscanner | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| - name: Restore NuGet packages | ||||||||||||||||||||||||||||||||||||||
| run: dotnet restore | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| # ββ SonarCloud: begin βββββββββββββββββββββββββββββββββββββββββββββββββββββ | ||||||||||||||||||||||||||||||||||||||
| - name: SonarCloud β begin scan | ||||||||||||||||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||||||||||||||||
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||
| SLN="${{ steps.solution.outputs.name }}" | ||||||||||||||||||||||||||||||||||||||
| VERSION="${{ steps.gitversion.outputs.semVer }}" | ||||||||||||||||||||||||||||||||||||||
| PROJECT="${GITHUB_REPOSITORY/\//_}" | ||||||||||||||||||||||||||||||||||||||
| ORG="${GITHUB_REPOSITORY_OWNER}" | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| dotnet sonarscanner begin \ | ||||||||||||||||||||||||||||||||||||||
| "/k:$PROJECT" \ | ||||||||||||||||||||||||||||||||||||||
| "/o:$ORG" \ | ||||||||||||||||||||||||||||||||||||||
| "/v:$VERSION" \ | ||||||||||||||||||||||||||||||||||||||
| "/d:sonar.host.url=https://sonarcloud.io" \ | ||||||||||||||||||||||||||||||||||||||
| "/d:sonar.token=$SONAR_TOKEN" \ | ||||||||||||||||||||||||||||||||||||||
| "/d:sonar.scanner.scanAll=false" \ | ||||||||||||||||||||||||||||||||||||||
| "/d:sonar.branch.name=main" \ | ||||||||||||||||||||||||||||||||||||||
| "/d:sonar.exclusions=**/bin/**/*,**/obj/**/*" \ | ||||||||||||||||||||||||||||||||||||||
| "/d:sonar.coverage.exclusions=**/${SLN}.Tests/**,**/*Tests.cs" \ | ||||||||||||||||||||||||||||||||||||||
| "/d:sonar.cs.opencover.reportsPaths=Tests/${SLN}.Tests/coverage.net9.0.opencover.xml" | ||||||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Aggregate coverage from all test projects, not just The test step runs every Also applies to: 128-137, 147-163, 198-201 π€ Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| # ββ Build βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | ||||||||||||||||||||||||||||||||||||||
| - name: Build | ||||||||||||||||||||||||||||||||||||||
| run: dotnet build --no-restore --verbosity minimal ${{ steps.solution.outputs.name }}.sln | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| # ββ Test + coverage βββββββββββββββββββββββββββββββββββββββββββββββββββββββ | ||||||||||||||||||||||||||||||||||||||
| - name: Test with coverage | ||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||
| for TEST_PROJ in $(find ./Tests -name "*.csproj" -type f); do | ||||||||||||||||||||||||||||||||||||||
| dotnet test "$TEST_PROJ" \ | ||||||||||||||||||||||||||||||||||||||
| --no-build \ | ||||||||||||||||||||||||||||||||||||||
| --verbosity minimal \ | ||||||||||||||||||||||||||||||||||||||
| /p:CollectCoverage=true \ | ||||||||||||||||||||||||||||||||||||||
| /p:CoverletOutputFormat='"cobertura,opencover,lcov"' \ | ||||||||||||||||||||||||||||||||||||||
| --logger:"junit;LogFilePath=test-results.xml" | ||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+128
to
+136
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. issue (bug_risk): Coverage report file naming may not match the hardcoded paths used later for Sonar/Codecov/Codacy.
|
||||||||||||||||||||||||||||||||||||||
| done | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| - name: Publish test results | ||||||||||||||||||||||||||||||||||||||
| uses: actions/upload-artifact@v4 | ||||||||||||||||||||||||||||||||||||||
| if: always() | ||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||
| name: test-results-${{ github.run_id }} | ||||||||||||||||||||||||||||||||||||||
| path: Tests/**/test-results.xml | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| # ββ Coverage reporting ββββββββββββββββββββββββββββββββββββββββββββββββββββ | ||||||||||||||||||||||||||||||||||||||
| - name: Report coverage β Codecov | ||||||||||||||||||||||||||||||||||||||
| uses: codecov/codecov-action@v4 | ||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||
| token: ${{ secrets.CODECOV_TOKEN }} | ||||||||||||||||||||||||||||||||||||||
| files: Tests/${{ steps.solution.outputs.name }}.Tests/coverage.net9.0.opencover.xml | ||||||||||||||||||||||||||||||||||||||
| fail_ci_if_error: false | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| - name: Report coverage β Codacy | ||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||
| SLN="${{ steps.solution.outputs.name }}" | ||||||||||||||||||||||||||||||||||||||
| curl -fsSL \ | ||||||||||||||||||||||||||||||||||||||
| https://github.com/codacy/codacy-coverage-reporter/releases/latest/download/codacy-coverage-reporter-assembly.jar \ | ||||||||||||||||||||||||||||||||||||||
| -o codacy-reporter.jar | ||||||||||||||||||||||||||||||||||||||
| java -jar codacy-reporter.jar report \ | ||||||||||||||||||||||||||||||||||||||
| -l CSharp \ | ||||||||||||||||||||||||||||||||||||||
| -t "${{ secrets.CODACY_PROJECT_TOKEN }}" \ | ||||||||||||||||||||||||||||||||||||||
| -r "Tests/${SLN}.Tests/coverage.net9.0.opencover.xml" | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| # ββ SonarCloud: end βββββββββββββββββββββββββββββββββββββββββββββββββββββββ | ||||||||||||||||||||||||||||||||||||||
| - name: SonarCloud β end scan | ||||||||||||||||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||||||||||||||||
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||||||||||||||||||||||||||||||||||||||
| run: dotnet sonarscanner end /d:sonar.token="$SONAR_TOKEN" | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| # βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | ||||||||||||||||||||||||||||||||||||||
| # RELEASE PHASE β everything below runs only after a clean green build/test | ||||||||||||||||||||||||||||||||||||||
| # βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| # ββ Collect binary artifacts ββββββββββββββββββββββββββββββββββββββββββββββ | ||||||||||||||||||||||||||||||||||||||
| - name: Collect binary artifacts | ||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||
| SLN="${{ steps.solution.outputs.name }}" | ||||||||||||||||||||||||||||||||||||||
| VERSION="${{ steps.gitversion.outputs.semVer }}" | ||||||||||||||||||||||||||||||||||||||
| mkdir -p Artifacts/Coverage | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| for TFM in $TARGET_FRAMEWORKS; do | ||||||||||||||||||||||||||||||||||||||
| # Core project | ||||||||||||||||||||||||||||||||||||||
| SRC="Src/${SLN}/bin/Release/${TFM}" | ||||||||||||||||||||||||||||||||||||||
| DST="Artifacts/Build/Core/${TFM}" | ||||||||||||||||||||||||||||||||||||||
| mkdir -p "$DST" | ||||||||||||||||||||||||||||||||||||||
| [ -d "$SRC" ] && rsync -a --exclude="refs/" "$SRC/" "$DST/" | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| # Sub-projects | ||||||||||||||||||||||||||||||||||||||
| for PROJ in $PACKAGE_PROJECTS; do | ||||||||||||||||||||||||||||||||||||||
| SRC="Src/${SLN}.${PROJ}/bin/Release/${TFM}" | ||||||||||||||||||||||||||||||||||||||
| DST="Artifacts/Build/${PROJ}/${TFM}" | ||||||||||||||||||||||||||||||||||||||
| mkdir -p "$DST" | ||||||||||||||||||||||||||||||||||||||
| [ -d "$SRC" ] && rsync -a --exclude="refs/" "$SRC/" "$DST/" | ||||||||||||||||||||||||||||||||||||||
| done | ||||||||||||||||||||||||||||||||||||||
| done | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| # Coverage reports | ||||||||||||||||||||||||||||||||||||||
| cp Tests/${SLN}.Tests/*.xml Artifacts/Coverage/ 2>/dev/null || true | ||||||||||||||||||||||||||||||||||||||
| cp Tests/${SLN}.Tests/*.json Artifacts/Coverage/ 2>/dev/null || true | ||||||||||||||||||||||||||||||||||||||
| cp Tests/${SLN}.Tests/*.info Artifacts/Coverage/ 2>/dev/null || true | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| # ββ Compress release zips βββββββββββββββββββββββββββββββββββββββββββββββββ | ||||||||||||||||||||||||||||||||||||||
| - name: Compress release archives | ||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||
| SLN="${{ steps.solution.outputs.name }}" | ||||||||||||||||||||||||||||||||||||||
| VERSION="${{ steps.gitversion.outputs.semVer }}" | ||||||||||||||||||||||||||||||||||||||
| mkdir -p Zips | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| # Coverage archive | ||||||||||||||||||||||||||||||||||||||
| zip -9 -r "Zips/${SLN}.${VERSION}.Coverage.zip" Artifacts/Coverage/ | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| # Per-TFM binary archives | ||||||||||||||||||||||||||||||||||||||
| for TFM in $TARGET_FRAMEWORKS; do | ||||||||||||||||||||||||||||||||||||||
| zip -9 -r "Zips/${SLN}.Core.${TFM}.${VERSION}.zip" \ | ||||||||||||||||||||||||||||||||||||||
| "Artifacts/Build/Core/${TFM}/" | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| for PROJ in $PACKAGE_PROJECTS; do | ||||||||||||||||||||||||||||||||||||||
| zip -9 -r "Zips/${SLN}.${PROJ}.${TFM}.${VERSION}.zip" \ | ||||||||||||||||||||||||||||||||||||||
| "Artifacts/Build/${PROJ}/${TFM}/" | ||||||||||||||||||||||||||||||||||||||
| done | ||||||||||||||||||||||||||||||||||||||
| done | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| # ββ Collect NuGet packages ββββββββββββββββββββββββββββββββββββββββββββββββ | ||||||||||||||||||||||||||||||||||||||
| - name: Collect NuGet packages | ||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||
| SLN="${{ steps.solution.outputs.name }}" | ||||||||||||||||||||||||||||||||||||||
| VERSION="${{ steps.gitversion.outputs.semVer }}" | ||||||||||||||||||||||||||||||||||||||
| mkdir -p Zips | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| # Core nupkg / snupkg | ||||||||||||||||||||||||||||||||||||||
| cp "Src/${SLN}/bin/Release/${SLN}.${VERSION}.nupkg" Zips/ 2>/dev/null || true | ||||||||||||||||||||||||||||||||||||||
| cp "Src/${SLN}/bin/Release/${SLN}.${VERSION}.snupkg" Zips/ 2>/dev/null || true | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| # Sub-project packages | ||||||||||||||||||||||||||||||||||||||
| for PROJ in $PACKAGE_PROJECTS; do | ||||||||||||||||||||||||||||||||||||||
| cp "Src/${SLN}.${PROJ}/bin/Release/${SLN}.${PROJ}.${VERSION}.nupkg" Zips/ 2>/dev/null || true | ||||||||||||||||||||||||||||||||||||||
| cp "Src/${SLN}.${PROJ}/bin/Release/${SLN}.${PROJ}.${VERSION}.snupkg" Zips/ 2>/dev/null || true | ||||||||||||||||||||||||||||||||||||||
| done | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| # ββ Push packages to NuGet.org ββββββββββββββββββββββββββββββββββββββββββββ | ||||||||||||||||||||||||||||||||||||||
| - name: Push to NuGet.org | ||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||
| for PKG in Zips/*.nupkg; do | ||||||||||||||||||||||||||||||||||||||
| echo "Publishing $PKG β¦" | ||||||||||||||||||||||||||||||||||||||
| dotnet nuget push "$PKG" \ | ||||||||||||||||||||||||||||||||||||||
| --api-key "${{ secrets.NUGET_TOKEN }}" \ | ||||||||||||||||||||||||||||||||||||||
| --source https://api.nuget.org/v3/index.json \ | ||||||||||||||||||||||||||||||||||||||
| --skip-duplicate | ||||||||||||||||||||||||||||||||||||||
| done | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| # ββ Tag the release commit ββββββββββββββββββββββββββββββββββββββββββββββββ | ||||||||||||||||||||||||||||||||||||||
| # This tag is what GitVersion reads on the next run to derive the next | ||||||||||||||||||||||||||||||||||||||
| # version increment, so it must be pushed before any subsequent builds. | ||||||||||||||||||||||||||||||||||||||
| - name: Tag release version | ||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||
| VERSION="v${{ steps.gitversion.outputs.semVer }}" | ||||||||||||||||||||||||||||||||||||||
| git config user.name "github-actions[bot]" | ||||||||||||||||||||||||||||||||||||||
| git config user.email "github-actions[bot]@users.noreply.github.com" | ||||||||||||||||||||||||||||||||||||||
| git tag -a "$VERSION" -m "Release $VERSION" | ||||||||||||||||||||||||||||||||||||||
| git push origin "$VERSION" | ||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+255
to
+261
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Make tag creation idempotent.
Suggested fix - name: Tag release version
run: |
VERSION="v${{ steps.gitversion.outputs.semVer }}"
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- git tag -a "$VERSION" -m "Release $VERSION"
- git push origin "$VERSION"
+ if git ls-remote --exit-code --tags origin "refs/tags/$VERSION" >/dev/null 2>&1; then
+ echo "Tag $VERSION already exists; skipping"
+ else
+ git tag -a "$VERSION" -m "Release $VERSION"
+ git push origin "$VERSION"
+ fiπ Committable suggestion
Suggested change
π€ Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| # ββ Create GitHub Release βββββββββββββββββββββββββββββββββββββββββββββββββ | ||||||||||||||||||||||||||||||||||||||
| - name: Create GitHub Release | ||||||||||||||||||||||||||||||||||||||
| uses: softprops/action-gh-release@v2 | ||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||
| tag_name: v${{ steps.gitversion.outputs.semVer }} | ||||||||||||||||||||||||||||||||||||||
| name: Release of ${{ steps.solution.outputs.name }} β v${{ steps.gitversion.outputs.semVer }} | ||||||||||||||||||||||||||||||||||||||
| generate_release_notes: true # auto-generates changelog from merged PRs | ||||||||||||||||||||||||||||||||||||||
| fail_on_unmatched_files: false | ||||||||||||||||||||||||||||||||||||||
| files: Zips/* | ||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add
CouchDBtoPACKAGE_PROJECTS.Src/CrispyWaffle.CouchDB/CrispyWaffle.CouchDB.csproj:1-10already carries package metadata, but this list omits it. The binary and NuGet loops below therefore never collect or publish the CouchDB artifacts.Suggested fix
π€ Prompt for AI Agents