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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 10 additions & 2 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,18 @@
"isRoot": true,
"tools": {
"docfx": {
"version": "2.76.0",
"version": "2.77.0",
"commands": [
"docfx"
]
],
"rollForward": false
},
"dotnet-reportgenerator-globaltool": {
"version": "5.4.3",
"commands": [
"reportgenerator"
],
"rollForward": false
}
}
}
31 changes: 19 additions & 12 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -24,31 +24,31 @@ dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case

dotnet_naming_symbols.interface.applicable_kinds = interface
dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.interface.required_modifiers =
dotnet_naming_symbols.interface.required_modifiers =

dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.types.required_modifiers =
dotnet_naming_symbols.types.required_modifiers =

dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.non_field_members.required_modifiers =
dotnet_naming_symbols.non_field_members.required_modifiers =

# Naming styles

dotnet_naming_style.begins_with_i.required_prefix = I
dotnet_naming_style.begins_with_i.required_suffix =
dotnet_naming_style.begins_with_i.word_separator =
dotnet_naming_style.begins_with_i.required_suffix =
dotnet_naming_style.begins_with_i.word_separator =
dotnet_naming_style.begins_with_i.capitalization = pascal_case

dotnet_naming_style.pascal_case.required_prefix =
dotnet_naming_style.pascal_case.required_suffix =
dotnet_naming_style.pascal_case.word_separator =
dotnet_naming_style.pascal_case.required_prefix =
dotnet_naming_style.pascal_case.required_suffix =
dotnet_naming_style.pascal_case.word_separator =
dotnet_naming_style.pascal_case.capitalization = pascal_case

dotnet_naming_style.pascal_case.required_prefix =
dotnet_naming_style.pascal_case.required_suffix =
dotnet_naming_style.pascal_case.word_separator =
dotnet_naming_style.pascal_case.required_prefix =
dotnet_naming_style.pascal_case.required_suffix =
dotnet_naming_style.pascal_case.word_separator =
dotnet_naming_style.pascal_case.capitalization = pascal_case
dotnet_style_operator_placement_when_wrapping = beginning_of_line
tab_width = 4
Expand All @@ -68,6 +68,9 @@ dotnet_diagnostic.CA2007.severity = warning
dotnet_code_quality_unused_parameters = all:suggestion
dotnet_diagnostic.CA1806.severity = error
dotnet_diagnostic.CA2208.severity = error
dotnet_style_explicit_tuple_names = true:suggestion
dotnet_style_prefer_inferred_tuple_names = true:suggestion
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion

[*.cs]
csharp_indent_labels = one_less_than_current
Expand Down Expand Up @@ -105,4 +108,8 @@ csharp_style_unused_value_assignment_preference = discard_variable:suggestion
dotnet_diagnostic.IDE0051.severity = error
dotnet_diagnostic.IDE0060.severity = error
dotnet_diagnostic.IDE0073.severity = error
csharp_style_prefer_primary_constructors = true:suggestion
csharp_style_prefer_primary_constructors = false:suggestion
csharp_prefer_system_threading_lock = true:suggestion

# Organize usings
dotnet_sort_system_directives_first = true
12 changes: 4 additions & 8 deletions .github/actions/setup-dotnet/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,11 @@ runs:
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Setup .NET 6.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
- name: Setup .NET 7.0
- name: Setup .NET 8.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.0.x
- name: Setup .NET 8.0
dotnet-version: 8.0.x
- name: Setup .NET 9.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
dotnet-version: 9.0.x
217 changes: 114 additions & 103 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,117 +2,128 @@
name: Create Release Workflow

on:
workflow_call:
inputs:
runs-on-config:
required: true
type: string
release-version:
required: true
type: string
is-pre-release:
required: true
type: boolean
workflow_call:
inputs:
runs-on-config:
required: true
type: string
release-version:
required: true
type: string
is-pre-release:
required: true
type: boolean

jobs:
create-release:
runs-on: ${{ inputs.runs-on-config }}
name: Create a New Release
steps:
- name: Create Release
id: create-release
uses: actions/github-script@v7
env:
RELEASE_VERSION: ${{ inputs.release-version }}
IS_PRERELEASE: ${{ inputs.is-pre-release }}
with:
result-encoding: string
script: |
const { RELEASE_VERSION, IS_PRERELEASE } = process.env
create-release:
runs-on: ${{ inputs.runs-on-config }}
name: Create a New Release
steps:
- name: Create Release
id: create-release
uses: actions/github-script@v7
env:
RELEASE_VERSION: ${{ inputs.release-version }}
IS_PRERELEASE: ${{ inputs.is-pre-release }}
with:
result-encoding: string
script: |
// Extract environment variables
const { RELEASE_VERSION, IS_PRERELEASE } = process.env

const release_version = `release/${RELEASE_VERSION}`
const is_prerelease = IS_PRERELEASE === 'true'
// Define release version and pre-release flag
const release_version = `release/${RELEASE_VERSION}`
const is_prerelease = IS_PRERELEASE === 'true'

const createReleaseResponse = await github.rest.repos.createRelease({
owner: context.repo.owner, // (Required) The account owner of the repository. The name is not case sensitive.
repo: context.repo.repo, // (Required) The name of the repository without the .git extension. The name is not case sensitive.
tag_name: release_version, // (Required) The name of the tag.
target_commitish: context.sha, // (Optional) Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch.
name: release_version, // (Optional) The name of the release.
// body: '', // (Optional) Text describing the contents of the tag.
// draft: true, // (Optional) true to create a draft (unpublished) release, false to create a published one.
prerelease: is_prerelease, // (Optional) true to identify the release as a prerelease. false to identify the release as a full release.
// discussion_category_name: , // (Optional) If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. For more information, see "Managing categories for discussions in your repository."
// make_latest: false, // (Optional) Specifies whether this release should be set as the latest release for the repository. Drafts and prereleases cannot be set as latest. Defaults to true for newly published releases. legacy specifies that the latest release should be determined based on the release creation date and higher semantic version.
generate_release_notes: true // (Optional) Whether to automatically generate the name and body for this release. If name is specified, the specified name will be used; otherwise, a name will be automatically generated. If body is specified, the body will be pre-pended to the automatically generated notes.
})
// Create a new release
const createReleaseResponse = await github.rest.repos.createRelease({
owner: context.repo.owner, // (Required) The account owner of the repository. The name is not case sensitive.
repo: context.repo.repo, // (Required) The name of the repository without the .git extension. The name is not case sensitive.
tag_name: release_version, // (Required) The name of the tag.
target_commitish: context.sha, // (Optional) Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch.
name: release_version, // (Optional) The name of the release.
// body: '', // (Optional) Text describing the contents of the tag.
// draft: true, // (Optional) true to create a draft (unpublished) release, false to create a published one.
prerelease: is_prerelease, // (Optional) true to identify the release as a prerelease. false to identify the release as a full release.
// discussion_category_name: , // (Optional) If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. For more information, see "Managing categories for discussions in your repository."
// make_latest: false, // (Optional) Specifies whether this release should be set as the latest release for the repository. Drafts and prereleases cannot be set as latest. Defaults to true for newly published releases. legacy specifies that the latest release should be determined based on the release creation date and higher semantic version.
generate_release_notes: true // (Optional) Whether to automatically generate the name and body for this release. If name is specified, the specified name will be used; otherwise, a name will be automatically generated. If body is specified, the body will be pre-pended to the automatically generated notes.
})

return createReleaseResponse.data.id
- uses: actions/download-artifact@v4
with:
name: docs
- uses: actions/download-artifact@v4
with:
name: nuget-package
- uses: actions/download-artifact@v4
with:
name: pypi-package
- name: Generate Bundle
run: |
zip -r bundle.zip ./Tableau.Migration.${{ inputs.release-version }}.nupkg docs.zip tableau_migration-pypi.zip
- name: Upload Release Assets
id: upload-docs
uses: actions/github-script@v7
env:
RELEASE_VERSION: ${{ inputs.release-version }}
RELEASE_ID: ${{ steps.create-release.outputs.result }}
with:
script: |
const fs = require('fs')

const { RELEASE_VERSION, RELEASE_ID } = process.env
// Return the release ID
return createReleaseResponse.data.id
- uses: actions/download-artifact@v4
with:
name: docs
- uses: actions/download-artifact@v4
with:
name: nuget-package
- uses: actions/download-artifact@v4
with:
name: pypi-package
- name: Generate Bundle
run: |
zip -r bundle.zip ./Tableau.Migration.${{ inputs.release-version }}.nupkg docs.zip tableau_migration-pypi.zip
- name: Upload Release Assets
id: upload-docs
uses: actions/github-script@v7
env:
RELEASE_VERSION: ${{ inputs.release-version }}
RELEASE_ID: ${{ steps.create-release.outputs.result }}
with:
script: |
const fs = require('fs')

// Extract environment variables
const { RELEASE_VERSION, RELEASE_ID } = process.env

const nuget_package = `Tableau.Migration.${RELEASE_VERSION}.nupkg`
// Define the NuGet package name
const nuget_package = `Tableau.Migration.${RELEASE_VERSION}.nupkg`

const uploadDocsResponse = await await github.rest.repos.uploadReleaseAsset({
owner: context.repo.owner, // (Required) The account owner of the repository. The name is not case sensitive.
repo: context.repo.repo, // (Required) The name of the repository without the .git extension. The name is not case sensitive.
release_id: RELEASE_ID, // (Required) The unique identifier of the release.
name: 'docs.zip', // (Required)
label: 'Docs (zip)', // (Optional)
data: fs.readFileSync('./docs.zip') // (Optional) The raw file data.
})
// Upload documentation zip file
const uploadDocsResponse = await github.rest.repos.uploadReleaseAsset({
owner: context.repo.owner, // (Required) The account owner of the repository. The name is not case sensitive.
repo: context.repo.repo, // (Required) The name of the repository without the .git extension. The name is not case sensitive.
release_id: RELEASE_ID, // (Required) The unique identifier of the release.
name: 'docs.zip', // (Required)
label: 'Docs (zip)', // (Optional)
data: fs.readFileSync('./docs.zip') // (Optional) The raw file data.
})

const uploadNugetResponse = await github.rest.repos.uploadReleaseAsset({
owner: context.repo.owner, // (Required) The account owner of the repository. The name is not case sensitive.
repo: context.repo.repo, // (Required) The name of the repository without the .git extension. The name is not case sensitive.
release_id: RELEASE_ID, // (Required) The unique identifier of the release.
name: 'Tableau.Migration.nupkg', // (Required)
label: 'Nuget Package (nupkg)', // (Optional)
data: fs.readFileSync(nuget_package) // (Optional) The raw file data.
})
// Upload NuGet package
const uploadNugetResponse = await github.rest.repos.uploadReleaseAsset({
owner: context.repo.owner, // (Required) The account owner of the repository. The name is not case sensitive.
repo: context.repo.repo, // (Required) The name of the repository without the .git extension. The name is not case sensitive.
release_id: RELEASE_ID, // (Required) The unique identifier of the release.
name: 'Tableau.Migration.nupkg', // (Required)
label: 'Nuget Package (nupkg)', // (Optional)
data: fs.readFileSync(nuget_package) // (Optional) The raw file data.
})

const uploadPypiResponse = await github.rest.repos.uploadReleaseAsset({
owner: context.repo.owner, // (Required) The account owner of the repository. The name is not case sensitive.
repo: context.repo.repo, // (Required) The name of the repository without the .git extension. The name is not case sensitive.
release_id: RELEASE_ID, // (Required) The unique identifier of the release.
name: 'tableau_migration-pypi.zip', // (Required)
label: 'Pypi Package (zip)', // (Optional)
data: fs.readFileSync('./tableau_migration-pypi.zip') // (Optional) The raw file data.
})
// Upload PyPI package
const uploadPypiResponse = await github.rest.repos.uploadReleaseAsset({
owner: context.repo.owner, // (Required) The account owner of the repository. The name is not case sensitive.
repo: context.repo.repo, // (Required) The name of the repository without the .git extension. The name is not case sensitive.
release_id: RELEASE_ID, // (Required) The unique identifier of the release.
name: 'tableau_migration-pypi.zip', // (Required)
label: 'Pypi Package (zip)', // (Optional)
data: fs.readFileSync('./tableau_migration-pypi.zip') // (Optional) The raw file data.
})

const uploadBundleResponse = await github.rest.repos.uploadReleaseAsset({
owner: context.repo.owner, // (Required) The account owner of the repository. The name is not case sensitive.
repo: context.repo.repo, // (Required) The name of the repository without the .git extension. The name is not case sensitive.
release_id: RELEASE_ID, // (Required) The unique identifier of the release.
name: 'bundle.zip', // (Required)
label: 'Bundle Package (zip)', // (Optional)
data: fs.readFileSync('./bundle.zip') // (Optional) The raw file data.
})
// Upload bundle zip file
const uploadBundleResponse = await github.rest.repos.uploadReleaseAsset({
owner: context.repo.owner, // (Required) The account owner of the repository. The name is not case sensitive.
repo: context.repo.repo, // (Required) The name of the repository without the .git extension. The name is not case sensitive.
release_id: RELEASE_ID, // (Required) The unique identifier of the release.
name: 'bundle.zip', // (Required)
label: 'Bundle Package (zip)', // (Optional)
data: fs.readFileSync('./bundle.zip') // (Optional) The raw file data.
})

return {
docs: uploadDocsResponse.data,
nuget: uploadNugetResponse.data,
pypi: uploadPypiResponse.data,
bundle: uploadBundleResponse.data
}
// Return the upload responses
return {
docs: uploadDocsResponse.data,
nuget: uploadNugetResponse.data,
pypi: uploadPypiResponse.data,
bundle: uploadBundleResponse.data
}
Loading
Loading