File tree Expand file tree Collapse file tree 1 file changed +50
-0
lines changed
Expand file tree Collapse file tree 1 file changed +50
-0
lines changed Original file line number Diff line number Diff line change 1+ # This is a basic workflow to help you get started with Actions
2+
3+ name : CD
4+
5+ # Controls when the action will run. Triggers the workflow on push or pull request
6+ # events but only for the master branch
7+ # on:
8+ # push:
9+ # tags:
10+ # - '*'
11+
12+ on :
13+ release :
14+ types : [published]
15+
16+ # A workflow run is made up of one or more jobs that can run sequentially or in parallel
17+ jobs :
18+ # This workflow contains a single job called "build"
19+ build :
20+ # The type of runner that the job will run on
21+ runs-on : ubuntu-latest
22+
23+ # Steps represent a sequence of tasks that will be executed as part of the job
24+ steps :
25+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
26+ - uses : actions/checkout@v2
27+
28+ # Runs a single command using the runners shell
29+ - name : Setup .NET Core
30+ uses : actions/setup-dotnet@v1
31+ with :
32+ dotnet-version : 6.0.x
33+
34+ - name : Build
35+ run : dotnet build --configuration Release
36+ working-directory : ./src/FileSizeFromBase64.NET
37+
38+ - name : Run unit tests
39+ run : dotnet test --configuration Release
40+ working-directory : ./tests/FileSizeFromBase64.NET.Tests
41+
42+ - name : Generate nuget package
43+ run : dotnet pack --configuration Release -o nupkg
44+ working-directory : ./src/FileSizeFromBase64.NET
45+
46+ - name : Publish nuget package
47+ run : find . -name *.nupkg -type f -print0 | xargs -0 -I pkg dotnet nuget push pkg -k $nuget_api_key -s "https://api.nuget.org/v3/index.json" --skip-duplicate
48+ env :
49+ nuget_api_key : ${{ secrets.NUGET_API_KEY }}
50+ working-directory : ./src/FileSizeFromBase64.NET/nupkg
You can’t perform that action at this time.
0 commit comments