-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (40 loc) · 1.05 KB
/
CiCd.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
name: CI/CD
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
release:
types: [created]
jobs:
Ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '7.0.x'
- name: Build
run: dotnet publish --configuration Release
- name: Upload binaries
uses: actions/upload-artifact@v3
with:
retention-days: 7
name: JAngine
path: JAngine/bin/Release/net7.0/publish/*
Cd:
runs-on: ubuntu-latest
needs: [Ci]
if: contains(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '7.0.x'
- name: Dotnet pack
run: |
dotnet pack -c Release JAngine
- name: Push packages
run: dotnet nuget push **/*.nupkg -k ${{secrets.NUGET_API_KEY}} -s https://api.nuget.org/v3/index.json --skip-duplicate