Skip to content

Commit 4e5c0d1

Browse files
committed
small fixes
1 parent a927a5a commit 4e5c0d1

4 files changed

Lines changed: 55 additions & 31 deletions

File tree

.github/workflows/dotnet.yml

Lines changed: 36 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,16 @@ on:
77
push:
88
branches:
99
- master
10-
- dev
11-
- hotfix/*
1210
- release/*
13-
- feature/*
11+
- hotfix/*
1412
pull_request:
1513
branches:
1614
- master
17-
workflow_dispatch: # <-- вот это даёт ручной запуск
15+
workflow_dispatch: # allows manual runs from the Actions tab
1816

1917
jobs:
2018
build:
21-
permissions: # <-- https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#defining-access-for-the-github_token-scopes
19+
permissions: # https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#defining-access-for-the-github_token-scopes
2220
contents: write
2321

2422
env:
@@ -31,11 +29,11 @@ jobs:
3129
shell: pwsh
3230

3331
steps:
32+
3433
- name: Checkout
3534
uses: actions/checkout@v4
3635
with:
37-
# Disabling shallow clones is recommended for improving the relevancy of reporting
38-
fetch-depth: 0
36+
fetch-depth: 0 # Disabling shallow clones is recommended for improving the relevancy of reporting
3937

4038
- name: Setup MSBuild
4139
uses: microsoft/setup-msbuild@v2
@@ -48,7 +46,7 @@ jobs:
4846
distribution: microsoft
4947
java-version: "17"
5048

51-
- name: Install GitVersion
49+
- name: Setup GitVersion
5250
uses: gittools/actions/gitversion/setup@v1.1.1
5351
with:
5452
versionSpec: 5.12.0
@@ -61,26 +59,42 @@ jobs:
6159
- name: Restore
6260
run: msbuild $env:SOLUTION /t:restore /p:configuration=$env:BUILD_CONFIG /v:m
6361

62+
- name: Build
63+
run: |
64+
dotnet build "$SOLUTION" --configuration "$BUILD_CONFIG" --no-restore \
65+
-p:Configuration=$BUILD_CONFIG \
66+
-p:Version=${GitVersion_SemVer} \
67+
-p:AssemblyVersion=${GitVersion_AssemblySemVer} \
68+
-p:FileVersion=${GitVersion_AssemblySemFileVer} \
69+
-p:InformationalVersion="${GitVersion_InformationalVersion}" \
70+
-p:Company="Denis Peshkov" \
71+
-p:Product="src/TypeScriptDefinitionGenerator" \
72+
-p:Description="Written on C#." \
73+
-p:RepositoryUrl="https://github.com/denis-peshkov/TypeScriptDefinitionGenerator.git" \
74+
-p:RepositoryType=git \
75+
-p:CLSCompliant=true \
76+
-p:NeutralLanguage=en
77+
6478
- name: Run tests
65-
run: dotnet test /p:Configuration=$BUILD_CONFIG --no-restore --no-build --verbosity normal
79+
run: >
80+
dotnet test /p:Configuration=$BUILD_CONFIG
81+
--no-restore
82+
--no-build
83+
--verbosity normal
84+
--collect:"XPlat Code Coverage"
85+
--results-directory ./TestResults
86+
--
87+
DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover
6688
6789
- name: SonarQube Scan
6890
uses: sonarsource/sonarcloud-github-action@v5 # Ex: v4.0.0, See the latest version at https://github.com/marketplace/actions/sonarcloud-scan
6991
with:
70-
# projectBaseDir: app/
71-
# args: >
72-
# -Dsonar.organization=peshkov
73-
# -Dsonar.projectKey=Cross.EdiEngine
74-
# -Dsonar.python.coverage.reportPaths=coverage.xml
75-
# -Dsonar.sources=Cross.EdiEngine/
76-
# -Dsonar.tests=tests/
77-
# -Dsonar.test.exclusions=tests/**
78-
# -Dsonar.verbose=true
7992
args: >
8093
-Dsonar.organization=peshkov
81-
-Dsonar.projectKey=Cross.EdiEngine
82-
-Dsonar.python.coverage.reportPaths=coverage.xml
83-
-Dsonar.sources=EdiEngine/
94+
-Dsonar.projectKey=TypeScriptDefinitionGenerator
95+
-Dsonar.cs.opencover.reportsPaths=TestResults/**/coverage.opencover.xml
96+
-Dsonar.sources=src/
97+
-Dsonar.tests=tests/
8498
-Dsonar.verbose=true
8599
env:
86100
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
@@ -135,11 +149,8 @@ jobs:
135149
env:
136150
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
137151

138-
- name: ref
139-
run: echo "github.head_ref 1 ${{ github.head_ref }} 2 $GITHUB_REF 3 ${{ github.ref }}"
140-
141152
- name: Create git Tag
142-
if: ${{ contains('refs/heads/hotfix', github.ref) || contains('refs/heads/release', github.ref) || contains('refs/heads/master', github.ref) }}
153+
if: ${{ contains('refs/heads/master', github.ref) || contains('refs/heads/release', github.ref) || contains('refs/heads/hotfix', github.ref) }}
143154
run: |
144155
git tag v${{ env.semVer }}
145156

GitVersion.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
next-version: 2.2.0
1+
next-version: 2.2.0 #
22
branches:
33
master:
44
regex: ^master$|^main$

README.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
1-
# TypeScript Definition Generator
1+
[![License](https://img.shields.io/github/license/denis-peshkov/TypeScriptDefinitionGenerator)](LICENSE)
2+
[![GitHub Release Date](https://img.shields.io/github/release-date/denis-peshkov/TypeScriptDefinitionGenerator?label=released)](https://github.com/denis-peshkov/TypeScriptDefinitionGenerator/releases)
3+
[![NuGetVersion](https://img.shields.io/nuget/v/TypeScriptDefinitionGenerator.svg)](https://nuget.org/packages/TypeScriptDefinitionGenerator/)
4+
[![NugetDownloads](https://img.shields.io/nuget/dt/TypeScriptDefinitionGenerator.svg)](https://nuget.org/packages/TypeScriptDefinitionGenerator/)
5+
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=TypeScriptDefinitionGenerator&metric=coverage)](https://sonarcloud.io/summary/new_code?id=TypeScriptDefinitionGenerator)
6+
[![issues](https://img.shields.io/github/issues/denis-peshkov/TypeScriptDefinitionGenerator)](https://github.com/denis-peshkov/TypeScriptDefinitionGenerator/issues)
7+
[![.NET PR](https://github.com/denis-peshkov/TypeScriptDefinitionGenerator/actions/workflows/dotnet.yml/badge.svg?event=pull_request)](https://github.com/denis-peshkov/TypeScriptDefinitionGenerator/actions/workflows/dotnet.yml)
8+
9+
![Size](https://img.shields.io/github/repo-size/denis-peshkov/TypeScriptDefinitionGenerator)
10+
[![GitHub contributors](https://img.shields.io/github/contributors/denis-peshkov/TypeScriptDefinitionGenerator)](https://github.com/denis-peshkov/TypeScriptDefinitionGenerator/contributors)
11+
[![GitHub commits since latest release (by date)](https://img.shields.io/github/commits-since/denis-peshkov/TypeScriptDefinitionGenerator/latest?label=new+commits)](https://github.com/denis-peshkov/TypeScriptDefinitionGenerator/commits/master)
12+
![Activity](https://img.shields.io/github/commit-activity/w/denis-peshkov/TypeScriptDefinitionGenerator)
13+
![Activity](https://img.shields.io/github/commit-activity/m/denis-peshkov/TypeScriptDefinitionGenerator)
14+
![Activity](https://img.shields.io/github/commit-activity/y/denis-peshkov/TypeScriptDefinitionGenerator)
215

3-
[![.NET](https://github.com/denis-peshkov/TypeScriptDefinitionGenerator/actions/workflows/dotnet.yml/badge.svg)](https://github.com/denis-peshkov/TypeScriptDefinitionGenerator/actions/workflows/dotnet.yml)
16+
# TypeScript Definition Generator
417

518
## NOTE: This is a customed redistribute
619
The orginal repo wrote by @madskristensen, **best regard for him**!

TypeScriptDefinitionGenerator.slnx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<Solution>
22
<Folder Name="/.github/">
3-
<File Path=".github\CONTRIBUTING.md" />
4-
<File Path=".github\ISSUE_TEMPLATE.md" />
3+
<File Path=".github/CONTRIBUTING.md" />
4+
<File Path=".github/ISSUE_TEMPLATE.md" />
55
</Folder>
66
<Folder Name="/.github/workflows/">
7-
<File Path=".github\workflows\dotnet.yml" />
7+
<File Path=".github/workflows/dotnet.yml" />
88
</Folder>
99
<Folder Name="/assets/">
1010
<File Path=".gitignore" />

0 commit comments

Comments
 (0)