Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net

name: CI - Pipeline - Validation
name: CI - Linux - Pipeline - Validation
permissions:
contents: read
issues: read
Expand All @@ -24,6 +24,7 @@ jobs:
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x

- name: Restore dependencies
run: dotnet restore ${{ env.solutionPath }}
- name: Build
Expand Down
50 changes: 50 additions & 0 deletions .github/workflows/ci-msbuild-pipeline-validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net

name: CI - msbuild - Pipeline - Validation
permissions:
contents: read
issues: read
checks: write
pull-requests: write
on:
pull_request:
branches: [ "main" ]
env:
solutionPath: '${{ github.workspace }}/src/Dataverse.ConfigurationMigrationTool/Dataverse.ConfigurationMigrationTool.sln'
xrmToolboxPath: 'src/Dataverse.ConfigurationMigrationTool/Dataverse.ConfigurationMigrationTool.XrmToolBox/Dataverse.ConfigurationMigrationTool.XrmToolBox.csproj'
jobs:
build:

runs-on: windows-latest

steps:
- name: git configure long path
run: git config --global core.longpaths true
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x

- name: Setup NuGet
uses: nuget/setup-nuget@v1
with:
nuget-version: 'latest' # Or a specific version like '5.11.1'

- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2

- name: Restore NuGet packages
run: nuget restore ${{ env.solutionPath }} # Replace with your solution file or project directory
- name: Build xrmToolBox
run: msbuild ${{ env.xrmToolboxPath }} -t:rebuild -verbosity:diag -property:Configuration=Release









84 changes: 80 additions & 4 deletions .github/workflows/ci-tag-release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Create Release on Tag

on:
push:
# Sequence of patterns matched against refs/tags
Expand All @@ -10,10 +11,12 @@ env:
solutionPath: '${{ github.workspace }}/src/Dataverse.ConfigurationMigrationTool/Dataverse.ConfigurationMigrationTool.sln'
solutionFolder: '${{ github.workspace }}/src/Dataverse.ConfigurationMigrationTool'
toolpublishlocation: '${{ github.workspace }}/configurationmigrationtool'
xtbpublishlocation: '${{ github.workspace }}/xtb'
xrmToolboxPath: 'src/Dataverse.ConfigurationMigrationTool/Dataverse.ConfigurationMigrationTool.XrmToolBox/Dataverse.ConfigurationMigrationTool.XrmToolBox.csproj'
jobs:


build:
buildLinux:

runs-on: ubuntu-latest

Expand All @@ -37,17 +40,72 @@ jobs:
with:
name: configurationmigrationtool
path: ${{env.toolpublishlocation}}

buildwindows:

runs-on: windows-latest

steps:
- name: git configure long path
run: git config --global core.longpaths true
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install GitVersion
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: '6.3.x'
- name: Determine Version
id: gitversion # step id used as reference for output values
uses: gittools/actions/gitversion/[email protected]
with:
updateAssemblyInfo: true
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x

- name: Setup NuGet
uses: nuget/setup-nuget@v1
with:
nuget-version: 'latest' # Or a specific version like '5.11.1'

- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2

- name: Restore NuGet packages
run: nuget restore ${{ env.solutionPath }} # Replace with your solution file or project directory
- name: Build xrmToolBox
run: msbuild ${{ env.xrmToolboxPath }} -t:rebuild -verbosity:diag -property:Configuration=Release

- name: Nuget Pack
run: nuget pack src/Dataverse.ConfigurationMigrationTool/Dataverse.ConfigurationMigrationTool.XTB.nuspec -Version ${{ steps.gitversion.outputs.assemblySemFileVer }}
- name: Create destination folder
run: mkdir -p ${{env.xtbpublishlocation}}

- name: Copy files using wildcard
run: cp *.nupkg ${{env.xtbpublishlocation}}
- name: Upload tool artifact
uses: actions/upload-artifact@v4
with:
name: configurationmigrationtool_xrmtoolbox
path: ${{env.xtbpublishlocation}}

release:
name: Create Release from tag
needs: build
needs: [ buildLinux, buildwindows]
runs-on: ubuntu-latest
steps:
- name: Download tool artifact
- name: Download clitool artifact
uses: actions/download-artifact@v4
with:
name: configurationmigrationtool
path: '${{ github.workspace }}/configurationmigrationtool'
- name: Download xtbtool artifact
uses: actions/download-artifact@v4
with:
name: configurationmigrationtool_xrmtoolbox
path: '${{ env.xtbpublishlocation }}'
- name: zip artifact # This would actually build your project, using zip for an example artifact
run: |
zip -r configurationmigrationtool${{ github.ref_name }}.zip configurationmigrationtool
Expand All @@ -61,7 +119,25 @@ jobs:
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Upload Release Asset
- name: Get nupkg path
id: get_nupkg_path
run: |
NUPKG_PATH=$(ls ./xtb/*.nupkg | head -n 1)
FILENAME=$(basename "$NUPKG_PATH")
echo "nupkg_path=$NUPKG_PATH" >> "$GITHUB_OUTPUT"
echo "filename=$FILENAME" >> "$GITHUB_OUTPUT" # Make it available to subsequent steps

- name: Upload NuGet Package Release Asset
id: upload-nuget-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ${{ steps.get_nupkg_path.outputs.nupkg_path }}
asset_name: ${{ steps.get_nupkg_path.outputs.filename }}
asset_content_type: application/zip
- name: Upload CLI Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/tag-with-gitversion.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Tag with GitVersion

on:
workflow_dispatch:

permissions:
contents: write

jobs:
tag:
name: Create tag from GitVersion
runs-on: ubuntu-latest
# additional safety to ensure this runs for main branch only
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout repository (full history)
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install GitVersion
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: '6.3.x'
- name: Determine Version
id: gitversion # step id used as reference for output values
uses: gittools/actions/gitversion/[email protected]

- name: Create and push annotated tag (minor+1, patch=0)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -euo pipefail
MAJOR="${{ steps.gitversion.outputs.major }}"
MINOR="${{ steps.gitversion.outputs.minor }}"
# increment minor and set patch to 0
NEW_MINOR=$((MINOR + 1))
TAG="v${MAJOR}.${NEW_MINOR}.0"

git tag -a $TAG -m "Tag created by GitHub Actions using GitVersion (incremented minor)"
git push origin $TAG

101 changes: 101 additions & 0 deletions GitVersion.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
assembly-versioning-scheme: MajorMinorPatch
assembly-file-versioning-scheme: MajorMinorPatch
tag-prefix: '[vV]?'
version-in-branch-pattern: (?<version>[vV]?\d+(\.\d+)?(\.\d+)?).*
major-version-bump-message: \+semver:\s?(breaking|major)
minor-version-bump-message: \+semver:\s?(feature|minor)
patch-version-bump-message: \+semver:\s?(fix|patch)
no-bump-message: \+semver:\s?(none|skip)
tag-pre-release-weight: 60000
commit-date-format: yyyy-MM-dd
merge-message-formats: {}
update-build-number: true
semantic-version-format: Strict
strategies:
- ConfiguredNextVersion
- Mainline
branches:
main:
mode: ContinuousDeployment
label: ''
increment: Patch
prevent-increment:
of-merged-branch: true
track-merge-target: false
track-merge-message: true
regex: ^master$|^main$
source-branches: []
is-source-branch-for: []
tracks-release-branches: false
is-release-branch: false
is-main-branch: true
pre-release-weight: 55000
feature:
mode: ContinuousDelivery
label: '{BranchName}'
increment: Patch
prevent-increment:
when-current-commit-tagged: false
track-merge-message: true
regex: ^features?[\/-](?<BranchName>.+)
source-branches:
- main
is-source-branch-for: []
is-main-branch: false
pre-release-weight: 30000
hotfix:
mode: ContinuousDelivery
label: '{BranchName}'
increment: Patch
prevent-increment:
when-current-commit-tagged: false
regex: ^hotfix(es)?[\/-](?<BranchName>.+)
source-branches:
- main
is-source-branch-for: []
is-release-branch: true
is-main-branch: false
pre-release-weight: 30000
pull-request:
mode: ContinuousDelivery
label: PullRequest{Number}
increment: Inherit
prevent-increment:
of-merged-branch: true
when-current-commit-tagged: false
track-merge-message: true
regex: ^(pull-requests|pull|pr)[\/-](?<Number>\d*)
source-branches:
- main
- feature
- hotfix
is-source-branch-for: []
pre-release-weight: 30000
unknown:
increment: Patch
prevent-increment:
when-current-commit-tagged: false
regex: (?<BranchName>.+)
source-branches:
- main
is-source-branch-for: []
pre-release-weight: 30000
ignore:
sha: []
paths: []
mode: ContinuousDelivery
label: '{BranchName}'
increment: Inherit
prevent-increment:
of-merged-branch: false
when-branch-merged: false
when-current-commit-tagged: true
track-merge-target: false
track-merge-message: true
commit-message-incrementing: Enabled
regex: ''
source-branches: []
is-source-branch-for: []
tracks-release-branches: false
is-release-branch: false
is-main-branch: false
Binary file added images/configurationmigrationtool_64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<DataCollector friendlyName="XPlat code coverage">
<Configuration>
<Format>cobertura,opencover</Format>
<Exclude>[*]Dataverse.ConfigurationMigrationTool.Console.Services.Dataverse.Connection.*,[*]Dataverse.ConfigurationMigrationTool.Console.Services.Dataverse.Configuration.*</Exclude>
<Exclude>[*]Dataverse.ConfigurationMigrationTool.Console.Services.Dataverse.Connection.*,[*]Dataverse.ConfigurationMigrationTool.Console.Services.Dataverse.Configuration.*,[*]Dataverse.ConfigurationMigrationTool.XrmToolBox.*</Exclude>
<ExcludeByFile>**/Program.cs,**/IServiceCollectionExtensions.cs</ExcludeByFile>
<SkipAutoProps>true</SkipAutoProps>
</Configuration>
Expand Down
Loading
Loading