-
Notifications
You must be signed in to change notification settings - Fork 9
45 lines (43 loc) · 1.25 KB
/
traystatus.yaml
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
name: TrayStatus CI/CD
on:
push:
paths:
- "TrayStatus/**"
jobs:
pack:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: pack traystatus.install
run: choco pack
working-directory: TrayStatus/TrayStatus.Install
- name: pack traystatus.portable
run: choco pack
working-directory: TrayStatus/TrayStatus.Portable
- name: pack traystatus
run: choco pack
working-directory: TrayStatus/TrayStatus
- name: publish artifact
uses: actions/upload-artifact@v2
with:
name: packages
path: 'TrayStatus/**/*.nupkg'
publish:
needs: pack
runs-on: windows-latest
if: github.ref == 'refs/heads/main'
steps:
- name: Download a single artifact
uses: actions/[email protected]
with:
name: packages
- name: publish to chocolatey community feed
env:
PUSH_URL: ${{ secrets.PUSH_URL }}
API_KEY: ${{ secrets.API_KEY }}
run: |
$nupkgs = Get-ChildItem . *.nupkg
foreach ($pkg in $nupkgs) {
Write-Host "Pushing: $($pkg.FullName) ..."
choco push "$($pkg.FullName)" -s "$env:PUSH_URL" -k "$env:API_KEY"
}