-
Notifications
You must be signed in to change notification settings - Fork 2
69 lines (58 loc) · 2.61 KB
/
AutoPkgReleaseBrew.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
61
62
63
64
65
66
67
68
69
---
name: Test AutoPkg Release Brew
on:
push:
paths:
- ".github/workflows/AutoPkgReleaseBrew.yaml"
- "AutoPkgRecipe/autopkg.rb.mustache"
- "AutoPkgRecipe/AutoPkgRelease.brew.recipe.yaml"
- "AutoPkgRecipe/AutoPkgReleasePkg.download.recipe.yaml"
pull_request:
paths:
- ".github/workflows/AutoPkgReleaseBrew.yaml"
- "AutoPkgRecipe/autopkg.rb.mustache"
- "AutoPkgRecipe/AutoPkgRelease.brew.recipe.yaml"
- "AutoPkgRecipe/AutoPkgReleasePkg.download.recipe.yaml"
jobs:
AutoPkgBrew:
runs-on: macos-latest
steps:
- name: Set github token autopkg
# required for githubreleaseinfoprovider in github actions
# without this, API limits will be hit
run: |
cd ~
echo ${{ secrets.GITHUB_TOKEN }} > ".autopkg_gh_token"
- name: Set github token homebrew
# echo 'export HOMEBREW_GITHUB_API_TOKEN=your_token_here' >> /Users/runner/.bash_profile
run: |
cd ~
echo 'export HOMEBREW_GITHUB_API_TOKEN=${{ secrets.GITHUB_TOKEN }}' >> .bash_profile
pwd
- uses: actions/checkout@v4
- 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 brew recipe
# See the following files used:
# - https://github.com/jgstew/jgstew-recipes/blob/main/AutoPkgRecipe/autopkg.rb.mustache
# - https://github.com/jgstew/jgstew-recipes/blob/main/AutoPkgRecipe/AutoPkgReleasePkg.download.recipe.yaml
# - https://github.com/jgstew/jgstew-recipes/blob/main/AutoPkgRecipe/AutoPkgRelease.brew.recipe.yaml
run: python autopkg/Code/autopkg run -vv AutoPkgRecipe/AutoPkgRelease.brew.recipe.yaml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: run brew install
run: brew install --cask --verbose /Users/runner/Library/AutoPkg/Cache/com.github.jgstew.brew.AutoPkgRelease/autopkg.rb
env:
HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: test brew installed autopkg
run: autopkg run -v Test-Recipes/AutopkgCore.test.recipe.yaml
- name: run brew uninstall
run: brew uninstall autopkg
- name: run brew audit
run: cd /Users/runner/Library/AutoPkg/Cache/com.github.jgstew.brew.AutoPkgRelease && brew audit --cask --new-cask --verbose --strict autopkg
env:
HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}