forked from cezarypiatek/MappingGenerator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e449dce
commit 9f93744
Showing
9 changed files
with
181 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: pr-verification | ||
on: | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
jobs: | ||
build-extension: | ||
runs-on: windows-latest | ||
env: | ||
DOTNET_NOLOGO: true | ||
DOTNET_CLI_TELEMETRY_OPTOUT: true | ||
Configuration: Release | ||
SolutionPath: MappingGenerator\MappingGenerator.sln | ||
VsixManifestPath: MappingGenerator\MappingGenerator\MappingGenerator.Vsix\source.extension.vsixmanifest | ||
Version: '1.21.${{ github.run_number }}-pr' | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup .NET Core | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: '3.1.x' | ||
- name: Setup MSBuild.exe | ||
uses: microsoft/setup-msbuild@v1.0.2 | ||
with: | ||
vs-version: '[16.8,16.9)' | ||
- name: Setup nuget | ||
uses: nuget/setup-nuget@v1 | ||
with: | ||
nuget-version: '5.x' | ||
- name: Restore NuGet Packages | ||
run: nuget restore $env:SolutionPath | ||
- name: Set version for VSIX | ||
run: | | ||
$manifestXml = [xml](Get-Content $env:VsixManifestPath -Raw) | ||
$manifestXml.PackageManifest.Metadata.Identity.Version = $env:Version | ||
$manifestXml.save($env:VsixManifestPath) | ||
- name: Build extension | ||
run: msbuild $env:SolutionPath /t:Rebuild | ||
env: | ||
DeployExtension: False | ||
- name: Test extension | ||
run: dotnet test --no-build --verbosity normal $env:SolutionPath | ||
- name: Collect artifacts - VSIX | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: MappingGenerator-VSIX | ||
path: MappingGenerator\MappingGenerator\MappingGenerator.Vsix\bin\Release\MappingGenerator.vsix | ||
- name: Collect artifacts - nugets | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: MappingGenerator-Nugets | ||
path: '**/MappingGenerator*.nupkg' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
name: release | ||
on: | ||
push: | ||
branches: | ||
- master | ||
jobs: | ||
build-extension: | ||
runs-on: windows-latest | ||
env: | ||
DOTNET_NOLOGO: true | ||
DOTNET_CLI_TELEMETRY_OPTOUT: true | ||
Configuration: Release | ||
SolutionPath: MappingGenerator\MappingGenerator.sln | ||
VsixManifestPath: MappingGenerator\MappingGenerator\MappingGenerator.Vsix\source.extension.vsixmanifest | ||
VsixPath: MappingGenerator\MappingGenerator\MappingGenerator.Vsix\bin\Release\MappingGenerator.vsix | ||
VsixPublishManifestPath: MappingGenerator\MappingGenerator\MappingGenerator.Vsix\publishManifest.json | ||
Version: '1.21.${{ github.run_number }}' | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
- name: Fetch all history and tags from all branches for release note | ||
run: git fetch --prune --unshallow | ||
- name: Setup .NET Core | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: '3.1.x' | ||
- name: Setup MSBuild.exe | ||
uses: microsoft/setup-msbuild@v1.0.2 | ||
id: MsBuildSetup | ||
with: | ||
vs-version: '[16.8,16.9)' | ||
- name: Setup nuget | ||
uses: nuget/setup-nuget@v1 | ||
with: | ||
nuget-version: '5.x' | ||
- name: Restore NuGet Packages | ||
run: nuget restore $env:SolutionPath | ||
- name: Set version for VSIX | ||
run: | | ||
$manifestXml = [xml](Get-Content $env:VsixManifestPath -Raw) | ||
$manifestXml.PackageManifest.Metadata.Identity.Version = $env:Version | ||
$manifestXml.save($env:VsixManifestPath) | ||
- name: Build extension | ||
run: msbuild $env:SolutionPath /t:Rebuild | ||
env: | ||
DeployExtension: False | ||
- name: Test extension | ||
run: dotnet test --no-build --verbosity normal $env:SolutionPath | ||
- name: Generate release note | ||
run: | | ||
$commitLog = git log "$(git describe --tags --abbrev=0)..HEAD" --pretty=format:"- %s" | ||
"What's new: `r`n`r`n$([string]::Join("`r`n",$commitLog))" | Out-File release_note.md -Encoding utf8 | ||
- name: Create Github Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ env.Version }} | ||
release_name: ${{ env.Version }} | ||
body_path: release_note.md | ||
draft: false | ||
prerelease: false | ||
- name: Upload Release Asset - MappingGenerator.vsix | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ${{ env.VsixPath }} | ||
asset_name: MappingGenerator.vsix | ||
asset_content_type: binary/octet-stream | ||
- name: Upload Release Asset - MappingGenerator Nuget | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: MappingGenerator\MappingGenerator\MappingGenerator\bin\Release\MappingGenerator.${{ env.Version }}.nupkg | ||
asset_name: MappingGenerator.${{ env.Version }}.nupkg | ||
asset_content_type: binary/octet-stream | ||
- name: Upload Release Asset - MappingGenerator.OnBuildGenerator Nuget | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: MappingGenerator\OnBuildGenerator\bin\Release\MappingGenerator.OnBuildGenerator.${{ env.Version }}.nupkg | ||
asset_name: MappingGenerator.OnBuildGenerator.${{ env.Version }}.nupkg | ||
asset_content_type: binary/octet-stream | ||
- name: Publish extension to Marketplace | ||
run: | | ||
$MsBuildDir = "${{ steps.MsBuildSetup.outputs.msbuildPath }}" | ||
$VsixPublisher = Join-Path -Path $MsBuildDir -ChildPath "..\..\..\VSSDK\VisualStudioIntegration\Tools\Bin\VsixPublisher.exe" -Resolve | ||
& $VsixPublisher publish -personalAccessToken ${{ secrets.VS_PUBLISHER_ACCESS_TOKEN }} -payload $env:VsixPath -publishManifest $env:VsixPublishManifestPath | ||
- name: Publish extension to Nuget | ||
run: | | ||
dotnet nuget push MappingGenerator\MappingGenerator\MappingGenerator\bin\Release\MappingGenerator.*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json | ||
dotnet nuget push MappingGenerator\OnBuildGenerator\bin\Release\MappingGenerator.OnBuildGenerator.*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
MappingGenerator/MappingGenerator/MappingGenerator.Vsix/overview.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
## Description | ||
Extension that allows you to easily generate an implementation for mapping methods. This generator mimics well known AutoMapper. No more dull code typing. [Check the full list of features](https://github.com/cezarypiatek/MappingGenerator). | ||
|
||
## Further Development | ||
If you find this extension useful (you feel it helps you on the daily basis) you can support further development by buying me a coffee (it's simple, just click the button below and follow further instructions). Sometimes it's hard to stay awake till midnight implementing new features, coffee helps me with that. I really appreciate your support in any form. | ||
|
||
[![](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/tmAJLYvWy) | ||
|
||
![](https://github.com/cezarypiatek/MappingGenerator/raw/master/doc/pure_mapping_method_newone.gif) | ||
|
||
|
||
Release notes: [MappingGenerator releases](https://github.com/cezarypiatek/MappingGenerator/releases) |
2 changes: 0 additions & 2 deletions
2
MappingGenerator/MappingGenerator/MappingGenerator.Vsix/packages.config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<package id="Microsoft.VisualStudio.SDK.Analyzers" version="15.7.4" targetFramework="net461" /> | ||
<package id="Microsoft.VisualStudio.Threading.Analyzers" version="15.7.17" targetFramework="net461" /> | ||
<package id="Microsoft.VSSDK.BuildTools" version="15.7.109" targetFramework="net461" developmentDependency="true" /> | ||
<package id="Pluralize.NET" version="0.1.84" targetFramework="net461" /> | ||
</packages> |
16 changes: 16 additions & 0 deletions
16
MappingGenerator/MappingGenerator/MappingGenerator.Vsix/publishManifest.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"$schema": "http://json.schemastore.org/vsix-publish", | ||
"categories": [ | ||
"coding", | ||
"scaffolding" | ||
], | ||
"identity": { | ||
"internalName": "mappinggenerator" | ||
}, | ||
"overview": "overview.md", | ||
"priceCategory": "free", | ||
"publisher": "54748ff9-45fc-43c2-8ec5-cf7912bc3b84", | ||
"private": false, | ||
"qna": true, | ||
"repo": "https://github.com/cezarypiatek/MappingGenerator" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters