-
Notifications
You must be signed in to change notification settings - Fork 29
48 lines (43 loc) · 1.66 KB
/
dotnet-core.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: .NET Core
on: [workflow_dispatch]
jobs:
build:
env:
VERSION_NUMBER: 2.0.${{github.run_number}}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Install dependencies
run: dotnet restore ./src/DataMasker/DataMasker.csproj
- name: Build Library
run: dotnet build ./src/DataMasker/DataMasker.csproj -c Release -r win-x64 --self-contained
- name: Publish Library
run: dotnet pack ./src/DataMasker/DataMasker.csproj -c Release -o ./build/ /p:Version=${{env.VERSION_NUMBER}}
- name: Push Nuget
run: dotnet nuget push ./build/DataMasker.${{env.VERSION_NUMBER}}.nupkg --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json
- name: Collect Artifact
uses: actions/upload-artifact@v2
with:
name: DataMasker.${{env.VERSION_NUMBER}}
path: ./build/DataMasker.${{env.VERSION_NUMBER}}.nupkg
- name: Build CLI
run: dotnet publish ./src/DataMasker.Runner -c Release -o ./runner-build/ -r win-x64 --self-contained
- name: action-zip
uses: montudor/[email protected]
with:
args: zip -r DataMasker.Runner.zip ./runner-build/
- name: Collect Artifact
uses: actions/upload-artifact@v2
with:
name: DataMasker.Runner.${{env.VERSION_NUMBER}}
path: ./DataMasker.Runner.zip
- name: Create Release (DataMasker.Runner)
uses: ncipollo/[email protected]
with:
artifacts: "DataMasker.Runner.zip"
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{env.VERSION_NUMBER}}