-
Notifications
You must be signed in to change notification settings - Fork 9
59 lines (55 loc) · 1.77 KB
/
phraseexpress.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: PhraseExpress deployment
on:
workflow_dispatch:
inputs:
pkgver:
description: Version of the package
required: true
msiurl:
description: URL to the MSI installation file
required: true
msisha:
description: SHA of the MSI file
required: true
zipurl:
description: URL of the ZIP installation file
required: true
zipsha:
description: SHA of the ZIP file
required: true
jobs:
pack:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: run pack script
run: |
md ${{ github.workspace }}/artifacts
.\pack.ps1 -version ${{ github.event.inputs.pkgver }} -msiurl ${{ github.event.inputs.msiurl }} -msisha ${{ github.event.inputs.msisha }} -zipurl ${{ github.event.inputs.zipurl }} -zipsha ${{ github.event.inputs.zipsha }} -outputdirectory ${{ github.workspace }}/artifacts
working-directory: PhraseExpress
- name: publish artifact
uses: actions/upload-artifact@v4
with:
name: packages
path: '${{ github.workspace }}/artifacts/**.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"
}