-
Notifications
You must be signed in to change notification settings - Fork 160
62 lines (61 loc) · 1.65 KB
/
build.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
59
60
61
62
name: Installer Build
on:
push:
branches:
- '**'
paths-ignore:
- '**.md'
tags-ignore: # prevent double action on releases
- 'v**'
pull_request:
release:
types: [created]
jobs:
build:
name: Build
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Cache DMGs
id: cache-dmgs
uses: actions/cache@v1
with:
path: dmgs
key: packages-dmg
- name: Download Packages
if: steps.cache-dmgs.outputs.cache-hit != 'true'
run: |
mkdir dmgs
curl -L -o dmgs/Packages.dmg http://s.sudre.free.fr/Software/files/Packages.dmg
- name: Install Packages
run: |
hdiutil attach dmgs/Packages.dmg
sudo installer -pkg /Volumes/Packages*/*.pkg -target /
hdiutil detach /Volumes/Packages*
- name: Build Package
run: Installer/build.sh
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: Installer
path: Installer/build/HaCMini.pkg
release:
name: Release
runs-on: ubuntu-latest
needs: build
if: github.event_name == 'release'
steps:
- name: Download Artifact
uses: actions/download-artifact@v2
with:
name: Installer
- name: Upload Release Asset
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: HaCMini.pkg
asset_name: HaCMini.pkg
asset_content_type: application/octet-stream