Skip to content

Commit f0831f1

Browse files
Merge pull request #414 from nclient/main
[Release] 0.12.0
2 parents a9bbd94 + 5aff275 commit f0831f1

File tree

186 files changed

+5823
-535
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

186 files changed

+5823
-535
lines changed
Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,14 @@ name: Build .NET project
33
inputs:
44
target-framework:
55
description: 'Target .NET framework'
6-
required: true
6+
required: false
7+
default: ''
78
solution:
89
description: 'Solution/project path'
910
required: true
11+
pack-as-tool:
12+
description: 'Enable PackAsTool property'
13+
required: true
1014

1115
runs:
1216
using: "composite"
@@ -16,7 +20,12 @@ runs:
1620
with:
1721
dotnet-version: 6.0.x
1822
- name: Restore dependencies and build
19-
run: dotnet build ${{ inputs.solution }} --framework ${{ inputs.target-framework }} --configuration Release -warnaserror
23+
if: inputs.target-framework == ''
24+
run: dotnet build ${{ inputs.solution }} --configuration Release -warnaserror
25+
shell: bash
26+
- name: Restore dependencies and build (only ${{ inputs.target-framework }} projects)
27+
if: inputs.target-framework != ''
28+
run: dotnet build ${{ inputs.solution }} -p:PackAsTool=${{ inputs.pack-as-tool }} --framework ${{ inputs.target-framework }} --configuration Release -warnaserror
2029
shell: bash
2130
- name: Compress build artifact
2231
run: tar cvzf build-artifacts-${{ inputs.target-framework }}.tar.gz bin
Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@ inputs:
44
version-prefix:
55
description: 'Overriding version prefix'
66
required: false
7-
default: 0.11.0
87
version-patch:
98
description: 'Overriding version patch'
109
required: false
11-
default: 1
1210
release-type:
1311
description: 'Release type (dev, alpha, beta, release)'
1412
required: true
@@ -25,13 +23,30 @@ runs:
2523
using: "composite"
2624
steps:
2725
- id: version-prefix-generator
28-
run: echo "::set-output name=version-prefix::${{ inputs.version-prefix }}"
26+
env:
27+
default-version-prefix: 0.12.0
28+
run: |
29+
if [[ "${{ inputs.version-prefix || '' }}" != "" ]]; then
30+
echo "::set-output name=version-prefix::${{ inputs.version-prefix }}"
31+
else
32+
echo "::set-output name=version-prefix::${{ env.default-version-prefix }}"
33+
fi
34+
shell: bash
35+
- id: version-patch-setter
36+
env:
37+
default-version-patch: 1
38+
run: |
39+
if [[ "${{ inputs.version-patch || '' }}" != "" ]]; then
40+
echo "version-patch=${{ inputs.version-patch }}" >> $GITHUB_ENV
41+
else
42+
echo "version-patch=${{ env.default-version-patch }}" >> $GITHUB_ENV
43+
fi
2944
shell: bash
3045
- id: version-suffix-generator
3146
run: |
3247
if [[ "${{ inputs.release-type }}" == "release" ]]; then
3348
echo "::set-output name=version-suffix::"
3449
else
35-
echo "::set-output name=version-suffix::${{ inputs.release-type }}.${{ inputs.version-patch }}"
50+
echo "::set-output name=version-suffix::${{ inputs.release-type }}.${{ env.version-patch }}"
3651
fi
3752
shell: bash
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ inputs:
77
solution:
88
description: 'Solution/project path'
99
required: true
10-
10+
1111
runs:
1212
using: "composite"
1313
steps:
14-
- name: Set the required terget .NET Core version
14+
- name: Set the required target .NET Core version
1515
run: |
1616
if [[ "${{ inputs.target-framework }}" == "netcoreapp3.1" ]]; then
1717
echo "dotnet-version=3.1.x" >> $GITHUB_ENV
@@ -32,8 +32,8 @@ runs:
3232
with:
3333
name: build-artifacts-${{ inputs.target-framework }}
3434
- name: Extract build artifacts
35-
run: tar -xvzf build-artifacts-${{ inputs.target-framework }}.tar.gz
35+
run: tar -xzf build-artifacts-${{ inputs.target-framework }}.tar.gz
3636
shell: bash
3737
- name: Test with ${{ inputs.target-framework }}
38-
run: dotnet test ${{ inputs.solution }} --framework ${{ inputs.target-framework }} --no-build --verbosity normal --configuration Release
38+
run: dotnet test ${{ inputs.solution }} --logger trx --results-directory ./TestResults --framework ${{ inputs.target-framework }} --no-build --verbosity normal --configuration Release
3939
shell: bash
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ runs:
3232
with:
3333
name: build-artifacts-${{ inputs.target-framework }}
3434
- name: Extract build artifacts
35-
run: tar -xvzf build-artifacts-${{ inputs.target-framework }}.tar.gz
35+
run: tar -xzf build-artifacts-${{ inputs.target-framework }}.tar.gz
3636
shell: bash
3737
- name: Test with ${{ inputs.target-framework }}
38-
run: dotnet test ${{ inputs.solution }} --framework ${{ inputs.target-framework }} --no-build --verbosity normal --configuration Release
38+
run: dotnet test ${{ inputs.solution }} --logger trx --results-directory ./TestResults --framework ${{ inputs.target-framework }} --no-build --verbosity normal --configuration Release
3939
shell: bash
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
schedule:
9+
- cron: '21 7 * * 1'
10+
11+
jobs:
12+
analyze:
13+
name: Analyze
14+
runs-on: ubuntu-latest
15+
permissions:
16+
actions: read
17+
contents: read
18+
security-events: write
19+
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
language: [ 'csharp' ]
24+
25+
steps:
26+
- name: Checkout repository
27+
uses: actions/checkout@v2
28+
29+
- name: Initialize CodeQL
30+
uses: github/codeql-action/init@v1
31+
with:
32+
languages: ${{ matrix.language }}
33+
34+
- name: Setup .NET 6.0
35+
uses: actions/setup-dotnet@v1
36+
with:
37+
dotnet-version: 6.0.x
38+
39+
- run: dotnet build NClient.sln --configuration Release
40+
41+
- name: Perform CodeQL Analysis
42+
uses: github/codeql-action/analyze@v1

.github/workflows/notification-fork.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

.github/workflows/notification-star.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: 'Notifications'
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
pull_request:
7+
issues:
8+
fork:
9+
watch:
10+
11+
jobs:
12+
notification:
13+
name: Notification
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: telegram-notify
17+
uses: cofob/telegram-actions@v1.3
18+
env:
19+
BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_API }}
20+
BOT_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}

0 commit comments

Comments
 (0)