-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (63 loc) · 1.97 KB
/
Copy pathcicd.yml
File metadata and controls
78 lines (63 loc) · 1.97 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
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
# https://github.com/actions
name: cicd.yml
on:
push:
paths:
- 'src/**'
branches:
- 'master'
- 'main'
- 'hotfix'
- 'release'
- 'develop'
- 'bugfix'
- 'feature'
- 'master/**'
- 'main/**'
- 'hotfix/**'
- 'release/**'
- 'develop/**'
- 'bugfix/**'
- 'feature/**'
repository_dispatch:
types:
- builddispatch
workflow_dispatch:
jobs:
debug:
if: ${{ false }} # <— disables the job without removing it
runs-on: windows-latest
steps:
- name: Checkout for Debug
uses: actions/checkout@v4
- name: Print GitHub Context
run: |
echo "Event Name: ${{ github.event_name }}"
echo "Committer Name: ${{ github.event.head_commit.committer.name }}"
echo "Actor: ${{ github.actor }}"
echo "Actor: ${{ github.event.head_commit.committer.name }}"
builddeploy:
if: (github.event_name == 'workflow_dispatch') || (github.event_name == 'repository_dispatch') || (github.event_name == 'push')
runs-on: windows-latest
env:
GH_TOKEN: ${{ github.token }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup-dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
- name: Diagnostic print enviroment vars
run: printenv
- name: Display dotnet version
run: dotnet --version
- name: Display powershell core version
run: pwsh --version
- name: Workflow Build/Deploy
run: .github/workflows/cicd.ps1 -NUGET_GITHUB_PUSH "${{ secrets.NUGET_GITHUB_PUSH }}" -NUGET_PAT "${{ secrets.NUGET_PAT }}" -NUGET_TEST_PAT "${{ secrets.NUGET_TEST_PAT }}" -PsGalleryApiKey "${{ secrets.POWERSHELL_GALLERY }}"
shell: pwsh