-
-
Notifications
You must be signed in to change notification settings - Fork 77
58 lines (48 loc) · 1.67 KB
/
Choco.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
49
50
51
52
53
54
55
56
57
58
on:
workflow_call:
workflow_dispatch:
inputs:
version:
description: 'Version to deploy'
required: true
jobs:
Deploy_Choco:
name: Publish App to Chocolatey
runs-on: windows-latest
steps:
- uses: actions/download-artifact@v4
name: Download Standalone Signed App Artifacts
with:
name: Standalone_Signed
path: .\StandaloneSigned
- uses: actions/download-artifact@v4
if: ${{ github.event_name == 'push' }}
name: Download Build Artifacts
with:
name: BuildArtifacts
path: .\BuildArtifacts
- name: Set VERSION Environment Variable (PUSH)
if: ${{ github.event_name == 'push' }}
run: |
$version = Get-Content ".\BuildArtifacts\version.txt"
echo "VERSION=$version" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
shell: powershell
- name: Set VERSION Environment Variable (Workflow Dispatch)
if: ${{ github.event_name == 'workflow_dispatch' }}
run: |
version = "${{ inputs.Version }}"
echo "VERSION=$version" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
shell: powershell
- uses: actions/download-artifact@v4
name: Download Chocolatey Artifacts
with:
name: Chocolatey
path: .\Chocolatey
- name: Push to Chocolatey
run: |
.\BuildArtifacts\scripts\push-choco.ps1 -Version "${{ env.VERSION}}" -CHOCOAPIKEY "${{ secrets.CHOCOAPIKEY}}"
shell: powershell
- name: Setup tmate session
if: ${{ failure() }}
uses: mxschmitt/action-tmate@v3
timeout-minutes: 15