Skip to content

Commit

Permalink
updates with -arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
DaveSkender committed Dec 30, 2024
1 parent c906169 commit 69bf207
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/deploy-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ concurrency:
jobs:
validate:
runs-on: ubuntu-latest

steps:
- name: Checkout source
uses: actions/checkout@v4
Expand All @@ -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: |
Expand All @@ -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 }}
Expand Down Expand Up @@ -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)
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -332,3 +332,6 @@ _site/

# zip artifacts
.DS_Store

# suppress dotnet tool manifest config (local) [for GitVersion]
.config
10 changes: 4 additions & 6 deletions src/gitversion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: []
Expand Down

0 comments on commit 69bf207

Please sign in to comment.