Skip to content

Commit 8b497f5

Browse files
Merge pull request #336 from nclient/main
[Release] 0.10.0
2 parents dbb6d52 + a7af6fe commit 8b497f5

File tree

653 files changed

+15225
-7928
lines changed

Some content is hidden

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

653 files changed

+15225
-7928
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: 'Release: Alpha'
2+
3+
on:
4+
push:
5+
branches: alpha-release
6+
7+
env:
8+
release-type: alpha
9+
nuget-source: https://api.nuget.org/v3/index.json
10+
11+
jobs:
12+
13+
release:
14+
if: github.ref == 'refs/heads/alpha-release'
15+
environment: release-alpha
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout Repo
19+
uses: actions/checkout@v2
20+
- id: release-info
21+
name: Release info
22+
uses: ./actions/release-info
23+
with:
24+
release-type: ${{ env.release-type }}
25+
- name: Push packaget to NuGet
26+
uses: ./actions/push
27+
with:
28+
version-prefix: ${{ steps.release-info.outputs.version-prefix }}
29+
version-suffix: ${{ steps.release-info.outputs.version-suffix }}
30+
source: ${{ env.nuget-source }}
31+
source-api-key: ${{ secrets.NUGET_API_KEY }}
32+
needsTag: true
33+
34+
validation:
35+
needs: release
36+
runs-on: ubuntu-latest
37+
steps:
38+
- name: Checkout Repo
39+
uses: actions/checkout@v2
40+
- id: release-info
41+
name: Release info
42+
uses: ./actions/release-info
43+
with:
44+
release-type: ${{ env.release-type }}
45+
- name: Test release
46+
uses: ./actions/test-release
47+
with:
48+
version-prefix: ${{ steps.release-info.outputs.version-prefix }}
49+
version-suffix: ${{ steps.release-info.outputs.version-suffix }}
50+
delay: 5m

.github/workflows/release-beta.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: 'Release: Beta'
2+
3+
on:
4+
push:
5+
branches: beta-release
6+
7+
env:
8+
release-type: beta
9+
nuget-source: https://api.nuget.org/v3/index.json
10+
11+
jobs:
12+
13+
release:
14+
if: github.ref == 'refs/heads/beta-release'
15+
environment: release-beta
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout Repo
19+
uses: actions/checkout@v2
20+
- id: release-info
21+
name: Release info
22+
uses: ./actions/release-info
23+
with:
24+
release-type: ${{ env.release-type }}
25+
- name: Push packaget to NuGet
26+
uses: ./actions/push
27+
with:
28+
version-prefix: ${{ steps.release-info.outputs.version-prefix }}
29+
version-suffix: ${{ steps.release-info.outputs.version-suffix }}
30+
source: ${{ env.nuget-source }}
31+
source-api-key: ${{ secrets.NUGET_API_KEY }}
32+
needsTag: true
33+
34+
validation:
35+
needs: release
36+
runs-on: ubuntu-latest
37+
steps:
38+
- name: Checkout Repo
39+
uses: actions/checkout@v2
40+
- id: release-info
41+
name: Release info
42+
uses: ./actions/release-info
43+
with:
44+
release-type: ${{ env.release-type }}
45+
- name: Test release
46+
uses: ./actions/test-release
47+
with:
48+
version-prefix: ${{ steps.release-info.outputs.version-prefix }}
49+
version-suffix: ${{ steps.release-info.outputs.version-suffix }}
50+
delay: 5m

.github/workflows/release-dev.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: 'Release: Dev'
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version-prefix:
7+
description: 'Version'
8+
required: true
9+
version-patch:
10+
description: 'Patch number'
11+
required: true
12+
13+
env:
14+
release-type: dev
15+
github-pkgs-source: https://nuget.pkg.github.com/nclient/index.json
16+
17+
jobs:
18+
19+
release:
20+
if: ${{ github.event.inputs.version-prefix }} != '' && ${{ github.event.inputs.version-patch }} != ''
21+
environment: release-dev
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Checkout Repo
25+
uses: actions/checkout@v2
26+
- id: release-info
27+
name: Release info
28+
uses: ./actions/release-info
29+
with:
30+
release-type: ${{ env.release-type }}
31+
version-prefix: ${{ github.event.inputs.version-prefix }}
32+
version-patch: dev.${{ github.event.inputs.version-patch }}
33+
- name: Push packaget to NuGet
34+
uses: ./actions/push
35+
with:
36+
version-prefix: ${{ steps.release-info.outputs.version-prefix }}
37+
version-suffix: ${{ steps.release-info.outputs.version-suffix }}
38+
source: ${{ env.github-pkgs-source }}
39+
source-api-key: ${{ secrets.GITHUB_TOKEN }}
40+
needsTag: false
41+
42+
validation:
43+
needs: release
44+
runs-on: ubuntu-latest
45+
steps:
46+
- name: Checkout Repo
47+
uses: actions/checkout@v2
48+
- id: release-info
49+
name: Release info
50+
uses: ./actions/release-info
51+
with:
52+
release-type: ${{ env.release-type }}
53+
version-prefix: ${{ github.event.inputs.version-prefix }}
54+
version-patch: dev.${{ github.event.inputs.version-patch }}
55+
- name: Test release
56+
uses: ./actions/test-release
57+
with:
58+
version-prefix: ${{ steps.release-info.outputs.version-prefix }}
59+
version-suffix: ${{ steps.release-info.outputs.version-suffix }}
60+
delay: 30s
61+
custom-source: ${{ env.github-pkgs-source }}
62+
custom-source-user: nclient
63+
custom-source-password: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

Lines changed: 33 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1,99 +1,50 @@
1-
name: Release
1+
name: 'Release'
22

33
on:
4-
workflow_dispatch:
54
push:
6-
branches:
7-
- alpha-release
8-
- beta-release
9-
- release
5+
branches: release
106

117
env:
12-
VersionPrefix: ${{secrets.VERSION_PREFIX}}
13-
VersionSuffix: unbound
14-
VersionSuffixPatch: ${{secrets.VERSION_SUFFIX_PATH}}
8+
release-type: release
9+
nuget-source: https://api.nuget.org/v3/index.json
1510

1611
jobs:
17-
publish:
12+
13+
release:
14+
if: github.ref == 'refs/heads/release'
15+
environment: release
1816
runs-on: ubuntu-latest
1917
steps:
20-
- name: Try set alpha version suffix
21-
if: github.ref == 'refs/heads/alpha-release'
22-
run: echo "VersionSuffix=alpha.${VersionSuffixPatch}" >> $GITHUB_ENV
23-
- name: Try set beta version suffix
24-
if: github.ref == 'refs/heads/beta-release'
25-
run: echo "VersionSuffix=beta.${VersionSuffixPatch}" >> $GITHUB_ENV
26-
- name: Try set release version suffix
27-
if: github.ref == 'refs/heads/release'
28-
run: |
29-
echo "VersionSuffix=" >> $GITHUB_ENV
30-
echo "VersionSuffixPatch=" >> $GITHUB_ENV
31-
- name: Exit because the branch is not released
32-
if: env.VersionSuffix == 'unbound'
33-
run: exit 1
34-
35-
- uses: actions/checkout@v2
36-
- name: Setup .NET Core 3.1
37-
uses: actions/setup-dotnet@v1
18+
- name: Checkout Repo
19+
uses: actions/checkout@v2
20+
- id: release-info
21+
name: Release info
22+
uses: ./actions/release-info
3823
with:
39-
dotnet-version: 3.1.x
40-
- name: Setup .NET 5.0
41-
uses: actions/setup-dotnet@v1
24+
release-type: ${{ env.release-type }}
25+
- name: Push packaget to NuGet
26+
uses: ./actions/push
4227
with:
43-
dotnet-version: 5.0.x
44-
- name: Restore dependencies and build
45-
run: dotnet build --configuration Release /warnaserror
46-
- name: Test
47-
run: dotnet test --no-build --verbosity normal --configuration Release
48-
- name: Pack
49-
run: dotnet pack ./Packable.slnf --no-build --output ./nupkgs --configuration Release
50-
- name: Publish
51-
run: dotnet nuget push ./nupkgs/ --source https://api.nuget.org/v3/index.json --api-key ${{secrets.NUGET_API_KEY}} --skip-duplicate
52-
- name: Try set pre-release tag
53-
if: env.VersionSuffix != ''
54-
run: echo "ReleaseTag=v${VersionPrefix}-${VersionSuffix}" >> $GITHUB_ENV
55-
- name: Try set release tag
56-
if: env.VersionSuffix == ''
57-
run: echo "ReleaseTag=v${VersionPrefix}" >> $GITHUB_ENV
58-
- name: Create release tag
59-
run: git tag ${{env.ReleaseTag}}
60-
- name: Push release tag
61-
run: git push origin ${{env.ReleaseTag}}
28+
version-prefix: ${{ steps.release-info.outputs.version-prefix }}
29+
version-suffix: ${{ steps.release-info.outputs.version-suffix }}
30+
source: ${{ env.nuget-source }}
31+
source-api-key: ${{ secrets.NUGET_API_KEY }}
32+
needsTag: true
6233

6334
validation:
35+
needs: release
6436
runs-on: ubuntu-latest
65-
needs: publish
6637
steps:
67-
- name: Try set alpha version suffix
68-
if: github.ref == 'refs/heads/alpha-release'
69-
run: echo "VersionSuffix=alpha.${VersionSuffixPatch}" >> $GITHUB_ENV
70-
- name: Try set beta version suffix
71-
if: github.ref == 'refs/heads/beta-release'
72-
run: echo "VersionSuffix=beta.${VersionSuffixPatch}" >> $GITHUB_ENV
73-
- name: Try set release version suffix
74-
if: github.ref == 'refs/heads/release'
75-
run: |
76-
echo "VersionSuffix=" >> $GITHUB_ENV
77-
echo "VersionSuffixPatch=" >> $GITHUB_ENV
78-
- name: Exit because the branch is not released
79-
if: env.VersionSuffix == 'unbound'
80-
run: exit 1
81-
82-
- name: Wait verification packages (5 min)
83-
uses: jakejarvis/wait-action@master
84-
with:
85-
time: '5m'
86-
87-
- uses: actions/checkout@v2
88-
- name: Setup .NET Core 3.1
89-
uses: actions/setup-dotnet@v1
38+
- name: Checkout Repo
39+
uses: actions/checkout@v2
40+
- id: release-info
41+
name: Release info
42+
uses: ./actions/release-info
9043
with:
91-
dotnet-version: 3.1.x
92-
- name: Setup .NET 5.0
93-
uses: actions/setup-dotnet@v1
44+
release-type: ${{ env.release-type }}
45+
- name: Test release
46+
uses: ./actions/test-release
9447
with:
95-
dotnet-version: 5.0.x
96-
- name: Restore dependencies and build
97-
run: dotnet build --configuration TestRelease /warnaserror
98-
- name: Test
99-
run: dotnet test --no-build --verbosity normal --configuration TestRelease
48+
version-prefix: ${{ steps.release-info.outputs.version-prefix }}
49+
version-suffix: ${{ steps.release-info.outputs.version-suffix }}
50+
delay: 5m

.github/workflows/test-base.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: 'Test: Base'
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
branches: [ main ]
7+
8+
jobs:
9+
build:
10+
name: Build with ${{ matrix.target-frameworks }}
11+
strategy:
12+
matrix:
13+
target-frameworks: [net48, net5.0]
14+
runs-on: windows-latest
15+
steps:
16+
- name: Checkout Repo
17+
uses: actions/checkout@v2
18+
- name: Build with ${{ matrix.target-frameworks }}
19+
uses: ./actions/build
20+
with:
21+
target-framework: ${{ matrix.target-frameworks }}
22+
solution: 'Tests.slnf'
23+
24+
test-dotnet-core:
25+
name: Test with ${{ matrix.target-frameworks }} on ${{ matrix.os }}
26+
needs: build
27+
strategy:
28+
matrix:
29+
os: [windows-latest]
30+
target-frameworks: [net48]
31+
runs-on: ${{ matrix.os }}
32+
steps:
33+
- name: Checkout Repo
34+
uses: actions/checkout@v2
35+
- name: Test with ${{ matrix.target-frameworks }}
36+
uses: ./actions/test-framework
37+
with:
38+
target-framework: ${{ matrix.target-frameworks }}
39+
solution: 'NClient.sln'
40+
41+
test-dotnet-framework:
42+
name: Test with ${{ matrix.target-frameworks }} on ${{ matrix.os }}
43+
needs: build
44+
strategy:
45+
matrix:
46+
os: [ubuntu-latest]
47+
target-frameworks: [net5.0]
48+
runs-on: ${{ matrix.os }}
49+
steps:
50+
- name: Checkout Repo
51+
uses: actions/checkout@v2
52+
- name: Test with ${{ matrix.target-frameworks }}
53+
uses: ./actions/test-core
54+
with:
55+
target-framework: ${{ matrix.target-frameworks }}
56+
solution: 'NClient.sln'

0 commit comments

Comments
 (0)