forked from gitter-badger/IdentityServer4
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (51 loc) · 2.04 KB
/
Copy pathci.yml
File metadata and controls
60 lines (51 loc) · 2.04 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
name: "CI"
on:
push:
branches:
- main
- feature/**
- dev*
tags:
- "*.*.*"
pull_request:
branches: [main]
env:
DOTNET_NOLOGO: true
jobs:
build:
strategy:
fail-fast: false
matrix:
runs-on: [macos-11, ubuntu-22.04, windows-latest]
name: ${{ matrix.runs-on }}
runs-on: ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET 8.0.x, 7.0.x and 6.0.x
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.0.x
7.0.x
8.0.x
- name: dotnet info
run: dotnet --info
- name: build default
run: pwsh ./build.ps1
- name: push package CloudSmith Dev
env:
SECRET_PUSH_CLOUDSMITH_TOKEN: ${{ secrets.PUSH_CLOUDSMITH_TOKEN }}
if: (env.SECRET_PUSH_CLOUDSMITH_TOKEN != null) && (matrix.runs-on == 'windows-latest') && (github.ref == 'refs/heads/feature/' || contains(github.ref, 'refs/heads/dev'))
run: dotnet nuget push .\nuget\*.nupkg -s https://nuget.cloudsmith.io/netlah/net-dev1/v3/index.json --skip-duplicate -k ${{ env.SECRET_PUSH_CLOUDSMITH_TOKEN }}
- name: push package MyGet
env:
SECRET_MYGET: ${{ secrets.MYGET }}
if: (env.SECRET_MYGET != null) && (matrix.runs-on == 'windows-latest') && (github.ref == 'refs/heads/main' || contains(github.ref, 'refs/tags/'))
run: dotnet nuget push .\nuget\*.nupkg -s https://www.myget.org/F/energy-company/api/v3/index.json --skip-duplicate -k ${{ env.SECRET_MYGET }}
- name: push package CloudSmith
env:
SECRET_PUSH_CLOUDSMITH_TOKEN: ${{ secrets.PUSH_CLOUDSMITH_TOKEN }}
if: (env.SECRET_PUSH_CLOUDSMITH_TOKEN != null) && (matrix.runs-on == 'windows-latest') && (github.ref == 'refs/heads/main' || contains(github.ref, 'refs/tags/'))
run: dotnet nuget push .\nuget\*.nupkg -s https://nuget.cloudsmith.io/netlah/net-main1/v3/index.json --skip-duplicate -k ${{ env.SECRET_PUSH_CLOUDSMITH_TOKEN }}