diff --git a/.github/workflows/pre-integration.yml b/.github/workflows/build.yml
similarity index 57%
rename from .github/workflows/pre-integration.yml
rename to .github/workflows/build.yml
index 91c5b73..e254e61 100644
--- a/.github/workflows/pre-integration.yml
+++ b/.github/workflows/build.yml
@@ -1,14 +1,10 @@
-name: "Pre-Integration"
+name: Build and test
on:
- pull_request:
- types:
- - opened
- - synchronize
- - reopened
+ push:
jobs:
- dotnet-build:
+ build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
@@ -31,27 +27,6 @@ jobs:
run: dotnet restore
- name: ๐ ๏ธ Building library in release mode
- run: dotnet build -c Release --no-restore
-
- dotnet-test:
- runs-on: ubuntu-latest
- needs:
- - dotnet-build
- steps:
- - name: ๐ Checkout repository0
- uses: actions/checkout@v4
- with:
- fetch-depth: 0
-
- - name: โ๏ธ Setup dotnet 8.0.x
- uses: actions/setup-dotnet@v4
- with:
- dotnet-version: '8.0.x'
-
- - name: ๐ Restore packages
- run: dotnet restore
-
- - name: ๐ ๏ธ Build
run: dotnet build -c Release --no-restore /p:UseSourceLink=true
- name: ๐งช Run unit tests
diff --git a/.github/workflows/post-integration.yml b/.github/workflows/post-integration.yml
deleted file mode 100644
index 5a13467..0000000
--- a/.github/workflows/post-integration.yml
+++ /dev/null
@@ -1,82 +0,0 @@
-name: "Post-Integration"
-
-on:
- push:
- branches:
- - main
- - '!stable'
- - '!release'
-
-env:
- ATC_EMAIL: 'atcnet.org@gmail.com'
- ATC_NAME: 'Atc-Net'
- NUGET_REPO_URL: 'https://nuget.pkg.github.com/atc-net/index.json'
-
-jobs:
- merge-to-stable:
- runs-on: ubuntu-latest
- steps:
- - name: ๐ Checkout repository
- uses: actions/checkout@v4
- with:
- fetch-depth: 0
- token: ${{ secrets.PAT_WORKFLOWS }}
-
- - name: โ๏ธ Sets environment variables - branch-name
- uses: nelonoel/branch-name@v1.0.1
-
- - name: โ๏ธ Sets environment variables - Nerdbank.GitVersioning
- uses: dotnet/nbgv@master
- with:
- setAllVars: true
-
- - name: โ๏ธ Setup dotnet 8.0.x
- uses: actions/setup-dotnet@v4
- with:
- dotnet-version: '8.0.x'
-
- - name: โ๏ธ Set up JDK 17
- uses: actions/setup-java@v3
- with:
- java-version: 17
- distribution: 'zulu'
-
- - name: ๐งน Clean
- run: dotnet clean -c Release && dotnet nuget locals all --clear
-
- - name: ๐ Restore packages
- run: dotnet restore
-
- - name: ๐ ๏ธ Build
- run: dotnet build -c Release --no-restore /p:UseSourceLink=true
-
- - name: ๐งช Run unit tests
- run: dotnet test -c Release --no-build --filter "Category!=Integration"
-
- - name: ๐ฉ๏ธ SonarCloud install scanner
- run: dotnet tool install --global dotnet-sonarscanner
-
- - name: ๐ฉ๏ธ SonarCloud analyze
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- shell: pwsh
- run: |
- dotnet sonarscanner begin /k:"atc-net_atc-kusto" /o:"atc-net" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io"
- dotnet build -c Release /p:UseSourceLink=true --no-restore
- dotnet sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"
-
- - name: โฉ Merge to stable-branch
- run: |
- git config --local user.email ${{ env.ATC_EMAIL }}
- git config --local user.name ${{ env.ATC_NAME }}
- git checkout stable
- git merge --ff-only main
- git push origin stable
-
- - name: ๐ณ๏ธ Creating library package for pre-release
- run: dotnet pack -c Release --no-restore -o ${GITHUB_WORKSPACE}/packages -p:RepositoryBranch=$BRANCH_NAME
-
- - name: ๐ฆ Push packages to GitHub Package Registry
- run: |
- dotnet nuget push ${GITHUB_WORKSPACE}/packages/Atc.Kusto.${{ env.NBGV_NuGetPackageVersion }}.nupkg -k ${{ secrets.GITHUB_TOKEN }} -s ${{ env.NUGET_REPO_URL }} --skip-duplicate
\ No newline at end of file
diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml
new file mode 100644
index 0000000..d9fe6fc
--- /dev/null
+++ b/.github/workflows/release-please.yml
@@ -0,0 +1,50 @@
+name: release-please
+
+on:
+ push:
+ branches:
+ - main
+
+jobs:
+ release-please:
+ runs-on: ubuntu-latest
+ steps:
+ - name: release-please
+ id: release
+ uses: googleapis/release-please-action@v4
+ with:
+ token: ${{ secrets.RELEASE_PLEASE_PAT }}
+
+ - name: ๐ Checkout repository
+ if: ${{ steps.release.outputs.release_created }}
+ uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+ token: ${{ secrets.RELEASE_PLEASE_PAT }}
+
+ - name: โ๏ธ Setup dotnet 8.0.x
+ if: ${{ steps.release.outputs.release_created }}
+ uses: actions/setup-dotnet@v4
+ with:
+ dotnet-version: '8.0.x'
+
+ - name: ๐งน Clean
+ if: ${{ steps.release.outputs.release_created }}
+ run: dotnet clean -c Release && dotnet nuget locals all --clear
+
+ - name: ๐ Restore packages
+ if: ${{ steps.release.outputs.release_created }}
+ run: dotnet restore
+
+ - name: ๐ ๏ธ Building library in release mode
+ if: ${{ steps.release.outputs.release_created }}
+ run: dotnet build -c Release --no-restore /p:UseSourceLink=true
+
+ - name: ๐ณ๏ธ Creating library package for release
+ if: ${{ steps.release.outputs.release_created }}
+ run: dotnet pack -c Release --no-restore -o ${GITHUB_WORKSPACE}/packages /p:PublicRelease=true
+
+ - name: ๐ฆ Push packages to NuGet
+ if: ${{ steps.release.outputs.release_created }}
+ run: |
+ dotnet nuget push ${GITHUB_WORKSPACE}/packages/*.nupkg -k ${{ secrets.NUGET_KEY }} -s https://api.nuget.org/v3/index.json --skip-duplicate --no-symbols
\ No newline at end of file
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
deleted file mode 100644
index cce7487..0000000
--- a/.github/workflows/release.yml
+++ /dev/null
@@ -1,57 +0,0 @@
-name: "Release"
-
-on:
- workflow_dispatch:
-
-env:
- ATC_EMAIL: 'atcnet.org@gmail.com'
- ATC_NAME: 'Atc-Net'
- NUGET_REPO_URL: 'https://api.nuget.org/v3/index.json'
-
-jobs:
- release:
- if: github.ref == 'refs/heads/stable'
- runs-on: ubuntu-latest
- steps:
- - name: ๐ Checkout repository
- uses: actions/checkout@v4
- with:
- fetch-depth: 0
- token: ${{ secrets.PAT_WORKFLOWS }}
-
- - name: โ๏ธ Sets environment variables - branch-name
- uses: nelonoel/branch-name@v1.0.1
-
- - name: โ๏ธ Sets environment variables - Nerdbank.GitVersioning
- uses: dotnet/nbgv@master
- with:
- setAllVars: true
-
- - name: โ๏ธ Setup dotnet 8.0.x
- uses: actions/setup-dotnet@v4
- with:
- dotnet-version: '8.0.x'
-
- - name: ๐งน Clean
- run: dotnet clean -c Release && dotnet nuget locals all --clear
-
- - name: ๐ Restore packages
- run: dotnet restore
-
- - name: ๐ ๏ธ Building library in release mode
- run: dotnet build -c Release --no-restore /p:UseSourceLink=true
-
- - name: โฉ Merge to release-branch
- run: |
- git config --local user.email ${{ env.ATC_EMAIL }}
- git config --local user.name ${{ env.ATC_NAME }}
- git checkout release
- git merge --ff-only stable
- git push origin release
-
- - name: ๐ณ๏ธ Creating library package for release
- run: dotnet pack -c Release --no-restore -o ${GITHUB_WORKSPACE}/packages -p:RepositoryBranch=$BRANCH_NAME /p:PublicRelease=true
-
- - name: ๐ฆ Push packages to NuGet
- run: |
- dotnet nuget push ${GITHUB_WORKSPACE}/packages/Atc.Kusto.${{ env.NBGV_NuGetPackageVersion }}.nupkg -k ${{ secrets.NUGET_KEY }} -s ${{ env.NUGET_REPO_URL }} --skip-duplicate --no-symbols
\ No newline at end of file
diff --git a/.release-please-manifest.json b/.release-please-manifest.json
new file mode 100644
index 0000000..7232bda
--- /dev/null
+++ b/.release-please-manifest.json
@@ -0,0 +1,3 @@
+{
+ ".": "1.0.8"
+}
diff --git a/Directory.Build.props b/Directory.Build.props
index 425022b..37ad484 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -14,6 +14,14 @@
en-US
+
+
+
+ 1.0.8
+
+ true
+
+
enable
12.0
diff --git a/release-please-config.json b/release-please-config.json
new file mode 100644
index 0000000..7660c5f
--- /dev/null
+++ b/release-please-config.json
@@ -0,0 +1,13 @@
+{
+ "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
+ "release-type": "simple",
+ "bootstrap-sha": "fba4d0158b0373d80f6fe37da2c3c9e4073ff703",
+ "pull-request-title-pattern": "chore: release version ${version}",
+ "packages": {
+ ".": {
+ }
+ },
+ "extra-files": [
+ "Directory.Build.props"
+ ]
+}
\ No newline at end of file
diff --git a/src/Directory.Build.props b/src/Directory.Build.props
index a2a8726..8146aed 100644
--- a/src/Directory.Build.props
+++ b/src/Directory.Build.props
@@ -54,6 +54,5 @@
-
diff --git a/version.json b/version.json
deleted file mode 100644
index 9f7c0ed..0000000
--- a/version.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json",
- "version": "1.0",
- "cloudBuild": {
- "buildNumber": {
- "enabled": true
- },
- "setVersionVariables": true,
- "setAllVariables": true
- }
-}