Skip to content

Commit

Permalink
GitTools#4017 - use MarkdownSnippets tool to embed .yml files as co…
Browse files Browse the repository at this point in the history
…de snippet in markdown
  • Loading branch information
arturcic committed Jul 18, 2024
1 parent 9ea1b88 commit df14b91
Show file tree
Hide file tree
Showing 8 changed files with 624 additions and 18 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ jobs:
runs-on: ubuntu-latest
name: DotNet Format
steps:
- uses: actions/checkout@v4
-
name: Checkout
uses: actions/checkout@v4
-
name: Setup .NET SDK
uses: actions/setup-dotnet@v4
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Markdown Update
on:
push:

env:
DOTNET_ROLL_FORWARD: "Major"
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_NOLOGO: 1

defaults:
run:
shell: pwsh

jobs:
docs:
name: Update Markdown (embedded snippets)
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Run MarkdownSnippets
run: |
dotnet tool install --global MarkdownSnippets.Tool
mdsnippets --write-header false
working-directory: ${{ github.workspace }}/docs/input
-
name: Check for changes
id: status
run: |
if ($null -ne (git status --porcelain)) { echo "has_changes=1"; echo "has_changes=1" >> $env:GITHUB_OUTPUT }
-
name: Push changes
run: |
git add --verbose .
git config user.name 'Artur Stolear'
git config user.email '[email protected]'
git commit -m 'Docs changes' --allow-empty
git push --force
if: steps.status.outputs.has_changes == '1'
10 changes: 7 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,19 @@ jobs:
name: Trigger ci flow
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get version
-
name: Checkout
uses: actions/checkout@v4
-
name: Get version
id: get-version
shell: pwsh
run: |
# Finding the version from release tag
$VERSION="${{ github.ref }}".Replace("refs/tags/", "")
"version=$VERSION" >> $env:GITHUB_OUTPUT
- uses: peter-evans/repository-dispatch@v3
-
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.RELEASE_GITHUB_TOKEN }}
repository: ${{ github.repository }}
Expand Down
1 change: 1 addition & 0 deletions build/CI.sln
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{
..\.github\workflows\_unit_tests.yml = ..\.github\workflows\_unit_tests.yml
..\.github\workflows\stale.yml = ..\.github\workflows\stale.yml
..\.github\workflows\winget.yml = ..\.github\workflows\winget.yml
..\.github\workflows\mkdocs.yml = ..\.github\workflows\mkdocs.yml
..\.github\dependabot.yml = ..\.github\dependabot.yml
EndProjectSection
EndProject
Expand Down
7 changes: 0 additions & 7 deletions docs/input/docs/learn/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,6 @@ SemVer.
If you want to fix the version, use `NuGetVersionV2` which will stay the same
after NuGet 3.0 comes out

## How do I choose my branching strategy (GitFlow vs GitHubFlow)

If you run `gitversion init` then choose `Getting started wizard` then choose
`Unsure, tell me more`, GitVersion will run through a series of questions which
will try and help point you towards a branching strategy and why you would use
it.

## Merged branch names as version source

When GitVersion considers previous commits to calculate a version number, it's
Expand Down
Loading

0 comments on commit df14b91

Please sign in to comment.