-
Notifications
You must be signed in to change notification settings - Fork 2
60 lines (49 loc) · 2.22 KB
/
AutoPkgReleaseNupkg.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
60
---
name: Test AutoPkg Release Nupkg
# based upon: https://github.com/autopkg/recipes/blob/master/AutoPkg/AutoPkgGitMaster.nupkg.recipe
on:
push:
paths:
- ".github/workflows/AutoPkgReleaseNupkg.yaml"
- "AutoPkgRecipe/AutoPkgReleaseSource.download.recipe.yaml"
- "AutoPkgRecipe/AutoPkgRelease.nupkg.recipe.yaml"
pull_request:
paths:
- ".github/workflows/AutoPkgReleaseNupkg.yaml"
- "AutoPkgRecipe/AutoPkgReleaseSource.download.recipe.yaml"
- "AutoPkgRecipe/AutoPkgRelease.nupkg.recipe.yaml"
jobs:
AutoPkgNupkg:
runs-on: windows-latest
steps:
- name: Set token
# required for githubreleaseinfoprovider in github actions
# without this, API limits will be hit
run: |
cd ~
echo ${{ secrets.GITHUB_TOKEN }} > ".autopkg_gh_token"
- uses: actions/checkout@v4
# TODO: switch to using https://github.com/autopkg/setup-autopkg-actions
- name: setup-autopkg local action
uses: ./.github/actions/setup-autopkg
- name: Install requirements
run: pip install --requirement requirements.txt
- name: run test recipe autopkg
run: python autopkg/Code/autopkg run -v Test-Recipes/AutopkgCore.test.recipe.yaml
- name: run nupkg recipe
run: python autopkg/Code/autopkg run -v AutoPkgRecipe/AutoPkgRelease.nupkg.recipe.yaml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: chocolately install python
# python versions: 3.8.10, 3.9.12, 3.10.5, 3.11.4
run: choco install python3 --version 3.10.11 --no-progress --yes --force --force-dependencies
- name: test chocolately install autopkg.nupkg
run: choco install autopkg -s "$env:USERPROFILE\Library\AutoPkg\Cache\com.github.jgstew.nupkg.AutoPkg\nupkgs\" --pre --no-progress --yes --force --verbose
- name: test autopkg chocolately install
run: autopkg run -vv Test-Recipes/AutopkgCore.test.recipe.yaml
- name: Get Choco log contents if failure occurs
if: ${{ failure() }}
# should upload artifact instead
run: cat C:\ProgramData\chocolatey\logs\chocolatey.log
# Related:
# - https://github.com/jgstew/bigfix-content/blob/master/.github/workflows/autopkg.yaml