chore(release): 14.1.1 #343
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: Build, Test, and Release | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build_test_and_release: | |
name: Release | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.PUSH_TO_PROTECTED_BRANCH }} | |
fetch-depth: '0' | |
- name: Install Versionize | |
run: dotnet tool install --global Versionize | |
- name: Setup git | |
run: | | |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
- name: Versionize Release | |
id: versionize | |
run: versionize --exit-insignificant-commits | |
continue-on-error: true | |
- name: No release required | |
if: steps.versionize.outcome != 'success' | |
run: echo "Skipping publishing. No release required." | |
- name: Setup .NET Core | |
if: steps.versionize.outcome == 'success' | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 8.0.101 | |
- name: Install dependencies | |
if: steps.versionize.outcome == 'success' | |
run: dotnet restore Firebend.AutoCrud.sln | |
- name: Build | |
if: steps.versionize.outcome == 'success' | |
run: dotnet build Firebend.AutoCrud.sln --configuration Release --no-restore | |
- name: Test | |
if: steps.versionize.outcome == 'success' | |
run: dotnet test Firebend.AutoCrud.sln --logger GitHubActions --no-restore --verbosity normal --filter FullyQualifiedName\!~IntegrationTests | |
- name: Pack Core | |
if: steps.versionize.outcome == 'success' | |
run: dotnet pack Firebend.AutoCrud.Core/Firebend.AutoCrud.Core.csproj --no-build -c Release --include-symbols -p:SymbolPackageFormat=snupkg -o . | |
- name: Pack EntityFramework | |
if: steps.versionize.outcome == 'success' | |
run: dotnet pack Firebend.AutoCrud.EntityFramework/Firebend.AutoCrud.EntityFramework.csproj --no-build -c Release --include-symbols -p:SymbolPackageFormat=snupkg -o . | |
- name: Pack EntityFramework Elastic | |
if: steps.versionize.outcome == 'success' | |
run: dotnet pack Firebend.AutoCrud.EntityFramework.Elastic/Firebend.AutoCrud.EntityFramework.Elastic.csproj --no-build -c Release --include-symbols -p:SymbolPackageFormat=snupkg -o . | |
- name: Pack Generator | |
if: steps.versionize.outcome == 'success' | |
run: dotnet pack Firebend.AutoCrud.Generator/Firebend.AutoCrud.Generator.csproj --no-build -c Release --include-symbols -p:SymbolPackageFormat=snupkg -o . | |
- name: Pack Mongo | |
if: steps.versionize.outcome == 'success' | |
run: dotnet pack Firebend.AutoCrud.Mongo/Firebend.AutoCrud.Mongo.csproj --no-build -c Release --include-symbols -p:SymbolPackageFormat=snupkg -o . | |
- name: Pack Web | |
if: steps.versionize.outcome == 'success' | |
run: dotnet pack Firebend.AutoCrud.DomainEvents.MassTransit/Firebend.AutoCrud.DomainEvents.MassTransit.csproj --no-build -c Release --include-symbols -p:SymbolPackageFormat=snupkg -o . | |
- name: Pack Domain Events MassTransit | |
if: steps.versionize.outcome == 'success' | |
run: dotnet pack Firebend.AutoCrud.Web/Firebend.AutoCrud.Web.csproj --no-build -c Release --include-symbols -p:SymbolPackageFormat=snupkg -o . | |
- name: Pack Change Tracking | |
if: steps.versionize.outcome == 'success' | |
run: dotnet pack Firebend.AutoCrud.ChangeTracking/Firebend.AutoCrud.ChangeTracking.csproj --no-build -c Release --include-symbols -p:SymbolPackageFormat=snupkg -o . | |
- name: Pack Change Tracking Ef | |
if: steps.versionize.outcome == 'success' | |
run: dotnet pack Firebend.AutoCrud.ChangeTracking.EntityFramework/Firebend.AutoCrud.ChangeTracking.EntityFramework.csproj --no-build -c Release --include-symbols -p:SymbolPackageFormat=snupkg -o . | |
- name: Pack Change Tracking Mongo | |
if: steps.versionize.outcome == 'success' | |
run: dotnet pack Firebend.AutoCrud.ChangeTracking.Mongo/Firebend.AutoCrud.ChangeTracking.Mongo.csproj --no-build -c Release --include-symbols -p:SymbolPackageFormat=snupkg -o . | |
- name: Pack Change Tracking Web | |
if: steps.versionize.outcome == 'success' | |
run: dotnet pack Firebend.AutoCrud.ChangeTracking.Web/Firebend.AutoCrud.ChangeTracking.Web.csproj --no-build -c Release --include-symbols -p:SymbolPackageFormat=snupkg -o . | |
- name: Pack IO | |
if: steps.versionize.outcome == 'success' | |
run: dotnet pack Firebend.AutoCrud.Io/Firebend.AutoCrud.Io.csproj --no-build -c Release --include-symbols -p:SymbolPackageFormat=snupkg -o . | |
- name: Pack IO Web | |
if: steps.versionize.outcome == 'success' | |
run: dotnet pack Firebend.AutoCrud.Io.Web/Firebend.AutoCrud.Io.Web.csproj --no-build -c Release --include-symbols -p:SymbolPackageFormat=snupkg -o . | |
- name: Pack Custom Fields EF | |
if: steps.versionize.outcome == 'success' | |
run: dotnet pack Firebend.AutoCrud.CustomFields.EntityFramework/Firebend.AutoCrud.CustomFields.EntityFramework.csproj --no-build -c Release --include-symbols -p:SymbolPackageFormat=snupkg -o . | |
- name: Pack Custom Fields Mongo | |
if: steps.versionize.outcome == 'success' | |
run: dotnet pack Firebend.AutoCrud.CustomFields.Mongo/Firebend.AutoCrud.CustomFields.Mongo.csproj --no-build -c Release --include-symbols -p:SymbolPackageFormat=snupkg -o . | |
- name: Pack Custom Fields Web | |
if: steps.versionize.outcome == 'success' | |
run: dotnet pack Firebend.AutoCrud.CustomFields.Web/Firebend.AutoCrud.CustomFields.Web.csproj --no-build -c Release --include-symbols -p:SymbolPackageFormat=snupkg -o . | |
- name: Publish Nuget Packages | |
if: steps.versionize.outcome == 'success' | |
run: dotnet nuget push *.nupkg --api-key ${{secrets.NUGET_API_KEY}} --source "https://api.nuget.org/v3/index.json" --skip-duplicate | |
- name: Push version changes | |
if: steps.versionize.outcome == 'success' | |
uses: CasperWA/push-protected@v2 | |
with: | |
token: ${{ secrets.PUSH_TO_PROTECTED_BRANCH }} | |
branch: main | |
tags: true | |
force: true | |
unprotect_reviews: true | |
sleep: 5 |