File tree 4 files changed +88
-2
lines changed
4 files changed +88
-2
lines changed Original file line number Diff line number Diff line change
1
+ name : CD
2
+
3
+ on :
4
+ release :
5
+ types :
6
+ - edited
7
+ - released
8
+
9
+ jobs :
10
+ release :
11
+
12
+ runs-on : ubuntu-latest
13
+
14
+ steps :
15
+ - uses : actions/checkout@v2
16
+ - name : Setup .NET
17
+ uses : actions/setup-dotnet@v1
18
+ with :
19
+ dotnet-version : 3.1.x
20
+
21
+ - name : Restore dependencies
22
+ run : dotnet restore
23
+ - name : Build
24
+ run : dotnet build --no-restore --configuration Release
25
+ - name : Test
26
+ run : dotnet test --no-build --configuration Release
27
+
28
+ - name : Create NuGet packages
29
+ run : |
30
+ VERSION=$(echo "${{ github.event.release.tag_name }}" | cut -c2-)
31
+ echo $VERSION
32
+ dotnet pack --no-build --configuration Release -p:Version=$VERSION
33
+ - name : Publish NuGet packages
34
+ run : dotnet nuget push "**/*.nupkg" --api-key $NUGET_AUTH_TOKEN --source https://api.nuget.org/v3/index.json --skip-duplicate
35
+ env :
36
+ NUGET_AUTH_TOKEN : ${{ secrets.NUGET_API_KEY }}
Original file line number Diff line number Diff line change
1
+ name : CI
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - ' *'
7
+ pull_request :
8
+ branches :
9
+ - develop
10
+ - master
11
+
12
+ jobs :
13
+ build :
14
+
15
+ runs-on : ubuntu-latest
16
+
17
+ steps :
18
+ - uses : actions/checkout@v2
19
+ - name : Setup .NET
20
+ uses : actions/setup-dotnet@v1
21
+ with :
22
+ dotnet-version : 3.1.x
23
+
24
+ - name : Restore dependencies
25
+ run : dotnet restore
26
+ - name : Build
27
+ run : dotnet build --no-restore --configuration Release
28
+ - name : Test
29
+ run : dotnet test --no-build --configuration Release
Original file line number Diff line number Diff line change @@ -11,8 +11,8 @@ It is fully implemented in Netstandard 2.0 and NET Core 3.0 so that it runs on m
11
11
12
12
| Name | Status |
13
13
| ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
14
- | master | [ ![ Build status] ( https://ci.appveyor. com/api/projects/status/2c0c15ta3ow8pfib/branch/master? svg=true )] ( https://ci.appveyor. com/project/ Mr-Markus/zigbeenet/branch/master ) |
15
- | develop | [ ![ Build status] ( https://ci.appveyor. com/api/projects/status/2c0c15ta3ow8pfib/branch/develop? svg=true )] ( https://ci.appveyor. com/project/ Mr-Markus/zigbeenet/branch/develop ) |
14
+ | master | [ ![ Build status] ( https://github. com/Mr-Markus/ZigbeeNet/actions/workflows/ci.yml/badge. svg?branch=master )] ( https://github. com/Mr-Markus/ZigbeeNet/actions/workflows/ci.yml ) |
15
+ | develop | [ ![ Build status] ( https://github. com/Mr-Markus/ZigbeeNet/actions/workflows/ci.yml/badge. svg?branch=develop )] ( https://github. com/Mr-Markus/ZigbeeNet/actions/workflows/ci.yml ) |
16
16
17
17
## Packages ##
18
18
Original file line number Diff line number Diff line change
1
+ # CI & CD setup
2
+
3
+ Continuous Integration (CI) and Continuous Delivery (CD)
4
+ has been implemented using GitHub Actions.
5
+ Content on these files can be found in ` .github/workflows/ ` folder.
6
+
7
+ CI uses ` dotnet ` command-line tooling in build steps.
8
+ Build is initiated by ` push ` to branch or ` pull request `
9
+ to ` develop ` or ` master ` branches.
10
+
11
+ CD also uses ` dotnet ` tooling. It's initiated by
12
+ creating GitHub Release in the repository.
13
+
14
+ ** Important** : CD uses ` tag_name ` from the release
15
+ as it's package version. Meaning if you tag your
16
+ release using ` v1.5.0 ` , it will automatically version NuGet
17
+ packages as ` 1.5.0 ` .
18
+
19
+ ** Important 2** : CD requires ` NUGET_API_KEY ` names [ secret] ( https://docs.github.com/en/actions/reference/encrypted-secrets )
20
+ to be stored into the repository secrets.
21
+ It's used when publishing NuGet Packages to the nuget.org.
You can’t perform that action at this time.
0 commit comments