diff --git a/.github/workflows/deploy-package.yml b/.github/workflows/deploy-package.yml index 62b680450..c45300a58 100644 --- a/.github/workflows/deploy-package.yml +++ b/.github/workflows/deploy-package.yml @@ -45,6 +45,7 @@ concurrency: jobs: validate: runs-on: ubuntu-latest + steps: - name: Checkout source uses: actions/checkout@v4 @@ -58,10 +59,10 @@ jobs: run: dotnet tool install --global GitVersion.Tool --version 6.0.5 - name: Show GitVersion config - run: dotnet-gitversion /showconfig /config src/gitversion.yml + run: dotnet-gitversion -showconfig -config src/gitversion.yml - name: Show GitVersion config (with Json output) - run: dotnet-gitversion /output json /l console /config src/gitversion.yml + run: dotnet-gitversion -output json -l console -config src/gitversion.yml - name: Validate preview settings run: | @@ -75,6 +76,7 @@ jobs: package: needs: validate runs-on: ubuntu-latest + outputs: version: ${{ steps.version_info.outputs.version }} url: ${{ steps.package_info.outputs.url }} @@ -129,7 +131,7 @@ jobs: id: gitversion run: | # Execute GitVersion and capture JSON output - gitversion /output json /config src/gitversion.yml > gitversion.json + gitversion -output json -config src/gitversion.yml > gitversion.json # Extract desired outputs version=$(jq -r '.SemVer' gitversion.json) prerelease_tag=$(jq -r '.PreReleaseTag' gitversion.json) diff --git a/.gitignore b/.gitignore index a517802a1..d826d2bfb 100644 --- a/.gitignore +++ b/.gitignore @@ -332,3 +332,6 @@ _site/ # zip artifacts .DS_Store + +# suppress dotnet tool manifest config (local) [for GitVersion] +.config diff --git a/src/gitversion.yml b/src/gitversion.yml index 34f1fb536..7d73c4d46 100644 --- a/src/gitversion.yml +++ b/src/gitversion.yml @@ -16,16 +16,14 @@ branches: is-main-branch: true label: "" - vNext: - regex: v[0-9].* + release: + regex: ^v[0-9]+\.* increment: Patch source-branches: [main] - tag: "preview." + label: "preview." unknown: - increment: Patch - source-branches: [main,vNext] - tag: "preview." + label: "preview." ignore: sha: []