forked from joncrain/github-actions
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (44 loc) · 1.52 KB
/
Copy pathmacos_pkg_example.yml
File metadata and controls
51 lines (44 loc) · 1.52 KB
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
name: macOS pkg build
on:
push:
branches:
- main
paths:
- 'pkg_example/foo/**'
workflow_dispatch:
jobs:
build:
runs-on: macos-latest
strategy:
matrix:
pkg_version: ["prd", "test", "dev"]
steps:
- name: Checkout
uses: actions/checkout@v3
# - name: Import Signing Cert
# uses: apple-actions/import-codesign-certs@8f1f4d258d6deeb3f85395452e1d14c59ce2957e
# with:
# p12-file-base64: ${{ secrets.CERTIFICATES_P12 }}
# p12-password: ${{ secrets.CERTIFICATES_P12_PASSWORD }}
- name: Find and Replace
run: |
/usr/bin/sed -i '' 's/pkg_version/${{ matrix.pkg_version }}/g' "pkg_example/foo/payload/private/var/tmp/foo.txt"
/usr/bin/sed -i '' 's/pkg_version/${{ matrix.pkg_version }}/g' "pkg_example/foo/build-info.plist"
- name: Run munkipkg
id: munkipkg
uses: joncrain/munkipkg-action@main
with:
pkg_subdir: pkg_example/foo
- name: Create Release
uses: softprops/action-gh-release@c9b46fe7aad9f02afd89b12450b780f52dacfb2d
with:
files: ${{ steps.munkipkg.outputs.filepath }}
tag_name: ${{ steps.munkipkg.outputs.tag }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: SimpleMDM Upload
if: env.SIMPLEMDM_API_KEY != null
run: |
curl https://a.simplemdm.com/api/v1/apps \
-F binary=@${{ steps.munkipkg.outputs.filepath }} \
-u ${{ secrets.SIMPLEMDM_API_KEY }}: