Commit 222d7e7 authored Sep 18, 2021 Verified
1 parent 49bf777 commit 222d7e7 Copy full SHA for 222d7e7
File tree 2 files changed +59
-35
lines changed
2 files changed +59
-35
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ name : Release
2
+
3
+ on :
4
+ workflow_dispatch :
5
+ inputs :
6
+ releaseVersion :
7
+ description : ' Release version'
8
+ required : true
9
+ default : ' 1.0.0-preview1'
10
+ packageSource :
11
+ description : ' Package source'
12
+ required : true
13
+ default : ' https://api.nuget.org/v3/index.json'
14
+
15
+ jobs :
16
+ release_packages :
17
+ name : Release packages to nuget.org
18
+ runs-on : ubuntu-latest
19
+
20
+ steps :
21
+ - uses : actions/checkout@v2
22
+
23
+ - name : Setup .NET
24
+ uses : actions/setup-dotnet@v1
25
+ with :
26
+ dotnet-version : 3.1.x
27
+
28
+ - name : Restore dependencies
29
+ run : dotnet restore
30
+ - name : Build
31
+ run : dotnet build --no-restore
32
+ - name : Test
33
+ run : dotnet test --no-build --verbosity normal
34
+ - name : Pack
35
+ run : dotnet pack --configuration Release -p:PackageVersion=${{ github.event.inputs.releaseVersion }} --output artifacts
36
+ - name : Push
37
+ run : dotnet nuget push artifacts/*.nupkg -s ${{ github.event.inputs.packageSource }} -k ${{secrets.NUGET_API_KEY}}
38
+
39
+ release_docker_image :
40
+ name : Release Docker image to Docker Hub
41
+ runs-on : ubuntu-latest
42
+
43
+ steps :
44
+ - uses : actions/checkout@v2
45
+
46
+ - name : Log in to Docker Hub
47
+ uses : docker/login-action@v1
48
+ with :
49
+ username : ${{ secrets.DOCKER_USERNAME }}
50
+ password : ${{ secrets.DOCKER_PASSWORD }}
51
+
52
+ - name : Build and push Docker image
53
+ uses : docker/build-push-action@v2
54
+ with :
55
+ context : .
56
+ push : true
57
+ tags : |
58
+ loicsharma/baget:latest
59
+ loicsharma/baget:${{ github.event.inputs.releaseVersion }}
You can’t perform that action at this time.
0 commit comments