From 69e43294f1b74ac8687691eb2ce0a1863b38c54d Mon Sep 17 00:00:00 2001 From: Paul Welter Date: Fri, 28 Jul 2023 12:01:50 -0500 Subject: [PATCH] switch to MinVer --- .github/workflows/dotnet.yml | 24 ++++++++++++------- .github/workflows/release.yml | 44 ----------------------------------- MongoDB.Abstracts.sln | 2 -- src/Directory.Build.props | 8 +++++-- version.json | 17 -------------- 5 files changed, 21 insertions(+), 74 deletions(-) delete mode 100644 .github/workflows/release.yml delete mode 100644 version.json diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index dcbea94..80765a7 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -1,6 +1,8 @@ name: Build env: + DOTNET_NOLOGO: true + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true BUILD_PATH: '${{github.workspace}}/artifacts' COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} @@ -8,11 +10,13 @@ on: push: branches: - master - - 'release/*' + - develop + tags: + - 'v*' pull_request: branches: - master - - 'release/*' + - develop jobs: @@ -41,11 +45,6 @@ jobs: 6.0.x 7.0.x - - name: Update Version - uses: dotnet/nbgv@master - with: - setAllVars: true - - name: Restore Dependencies run: dotnet restore @@ -83,7 +82,7 @@ jobs: deploy: runs-on: ubuntu-latest needs: build - if: success() && github.event_name != 'pull_request' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release')) + if: success() && github.event_name != 'pull_request' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v')) steps: - name: Download Artifact @@ -98,8 +97,15 @@ jobs: dotnet nuget push $package --source https://nuget.pkg.github.com/loresoft/index.json --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate done + - name: Publish Packages feedz + run: | + for package in $(find -name "*.nupkg"); do + echo "${0##*/}": Pushing $package... + dotnet nuget push $package --source https://f.feedz.io/loresoft/open/nuget/index.json --api-key ${{ secrets.FEEDDZ_KEY }} --skip-duplicate + done + - name: Publish Packages Nuget - if: startsWith(github.ref, 'refs/heads/release') + if: startsWith(github.ref, 'refs/tags/v') run: | for package in $(find -name "*.nupkg"); do echo "${0##*/}": Pushing $package... diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 8416d74..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: Release - -on: - workflow_dispatch: - inputs: - versionIncrement: - description: 'Which part of the version is incremented' - default: 'minor' - type: choice - options: - - major - - minor - - build - -jobs: - release: - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Install .NET Core - uses: actions/setup-dotnet@v3 - with: - dotnet-version: 7.0.x - - - name: Install GitVersioning - run: dotnet tool update -g nbgv - - - name: Initialize - run: | - git config user.name "GitHub Actions" - git config user.email noreply@github.com - - - name: Create Release - run: nbgv prepare-release --versionIncrement $VERSION_INCREMENT - env: - VERSION_INCREMENT: ${{ inputs.versionIncrement }} - - - name: Push Release - run: git push --all diff --git a/MongoDB.Abstracts.sln b/MongoDB.Abstracts.sln index 0afcbe8..1876ec6 100644 --- a/MongoDB.Abstracts.sln +++ b/MongoDB.Abstracts.sln @@ -12,8 +12,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{AEBC64A5 coverlet.runsettings = coverlet.runsettings src\Directory.Build.props = src\Directory.Build.props .github\workflows\dotnet.yml = .github\workflows\dotnet.yml - .github\workflows\release.yml = .github\workflows\release.yml - version.json = version.json EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C480AF26-E87F-4ACA-9F34-047BDAE3A769}" diff --git a/src/Directory.Build.props b/src/Directory.Build.props index b194ee0..da4777f 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -28,10 +28,14 @@ enable 1591 + + + v + - + @@ -46,5 +50,5 @@ false - + diff --git a/version.json b/version.json deleted file mode 100644 index efc1e9c..0000000 --- a/version.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/main/src/NerdBank.GitVersioning/version.schema.json", - "version": "5.8-beta", - "publicReleaseRefSpec": [ - "^refs/heads/master$", - "^refs/heads/release/v\\d+(?:\\.\\d+)?$" - ], - "cloudBuild": { - "buildNumber": { - "enabled": true - } - }, - "release": { - "branchName": "release/v{version}", - "firstUnstableTag": "beta" - } -} \ No newline at end of file