-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (36 loc) · 1.35 KB
/
chocolatey.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
name: Upload to Chocolatey repo
on:
workflow_dispatch:
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.x'
- name: Restore dependencies ChocolateStoreCore
run: |
cd ${{ github.workspace }}\ChocolateStoreCore
dotnet restore ${{ github.workspace }}\ChocolateStoreCore\ChocolateStoreCore.csproj -r win-x86
- name: Build ChocolateStoreCore
run: |
dotnet build ${{ github.workspace }}\ChocolateStoreCore\ChocolateStoreCore.csproj --configuration Release --no-restore
- name: Publish
run: |
pwsh -File ${{ github.workspace }}\publish.ps1 -dir ${{ github.workspace }}\ChocolateStoreCore
- name: Create chocolatey package
run: |
pwsh -File ${{ github.workspace }}\package.ps1 -dir ${{ github.workspace }}\ChocolateStoreCore
- name: Add artefacts
uses: actions/upload-artifact@v3
with:
name: Assets
path: "${{ github.workspace }}/release/*.nupkg"
- name: Chocolatey
env:
CHOCOLATEY_API_KEY: ${{secrets.CHOCOLATEY_API_KEY}}
run: |
pwsh -File ${{ github.workspace }}\upload.ps1 -dir ${{ github.workspace }}\ChocolateStoreCore