-
Notifications
You must be signed in to change notification settings - Fork 17
58 lines (54 loc) · 1.39 KB
/
ci.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
49
50
51
52
53
54
55
56
57
58
name: CI
on:
push:
pull_request:
defaults:
run:
shell: pwsh
env:
dotnet-version: "5.0.x"
node-version: "12.x"
build_version: "0.0.3.${{ github.run_number }}"
jobs:
ci:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.dotnet-version }}
- name: Setup NodeJS
uses: actions/setup-node@v1
with:
node-version: ${{ env.node-version }}
- name: Setup psake
run: Set-PSRepository -Name PSGallery -InstallationPolicy Trusted; Install-Module -Name psake
- name: CI
run: Invoke-psake ci
- name: Upload reports
uses: actions/upload-artifact@v2
with:
name: ci-${{ matrix.os }}
path: ./reports
invoke-cd:
needs: ci
runs-on: ubuntu-latest
steps:
- name: CD
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.PA_TOKEN }}
event-type: cd
- name: CD Preview
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/dev' }}
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.PA_TOKEN }}
event-type: cd-preview