-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (82 loc) · 2.18 KB
/
cicd.yml
File metadata and controls
87 lines (82 loc) · 2.18 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: CICD
on:
push:
branches:
- main
pull_request:
release:
types:
- published
workflow_dispatch:
permissions: read-all
env:
DOTNET_NOLOGO: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
jobs:
ci:
name: CI
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v6
with:
lfs: true
fetch-depth: 0
- name: "Install .NET Core SDK"
uses: actions/setup-dotnet@v5.2.0
- name: "Install InvokeBuild Module"
shell: pwsh
run: Install-Module -Name InvokeBuild -Force
- name: "Restore"
shell: pwsh
run: .\restore.ps1 -Instance ${{github.run_id}}
- name: "Format"
shell: pwsh
run: .\format.ps1 -Instance ${{github.run_id}}
- name: "Version"
shell: pwsh
run: .\version.ps1 -Instance ${{github.run_id}}
- name: "Build"
shell: pwsh
run: .\build.ps1 -Instance ${{github.run_id}}
- name: "Test"
shell: pwsh
run: .\test.ps1 -Instance ${{github.run_id}}
- name: "Pack"
shell: pwsh
run: .\pack.ps1 -Instance ${{github.run_id}}
- name: "Publish Artefacts"
uses: actions/upload-artifact@v7.0.1
with:
name: .trash
path: ".trash"
include-hidden-files: true
cd:
name: CD
needs: ci
if: github.event_name == 'release'
environment:
name: "Release"
url: "https://github.com/${{ github.repository }}/releases/tag/${{ github.ref_name }}"
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v6
with:
lfs: true
fetch-depth: 0
- name: "Download Artefact"
uses: actions/download-artifact@v8.0.1
with:
name: ".trash"
path: "./.trash"
- name: "Install InvokeBuild Module"
shell: pwsh
run: Install-Module -Name InvokeBuild -Force
- name: "Publish"
env:
NUGET_API_KEY: ${{secrets.NUGET_API_KEY}}
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
shell: pwsh
run: .\publish.ps1 -Instance ${{github.run_id}}