forked from ZzzM/HostsX
-
Notifications
You must be signed in to change notification settings - Fork 33
68 lines (51 loc) · 1.58 KB
/
main.yml
File metadata and controls
68 lines (51 loc) · 1.58 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Deploy
on:
push:
tags:
- '*'
workflow_dispatch:
jobs:
Deploy:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v2.4.0
- name: Package
run: |
fastlane run increment_build_number build_number:${GITHUB_SHA::7}
fastlane package
- name: Create
run: |
brew install create-dmg
create-dmg \
--volicon AppIcon.icns \
--hdiutil-quiet \
--app-drop-link 0 30 \
$APP_SCHEME.dmg \
$APP_SCHEME.app
- name: Update
run: |
build=`defaults read $PWD/$APP_SCHEME.app/Contents/Info.plist CFBundleVersion`
signature=`$PWD/sign_update -s $SPARKLE_KEY $APP_SCHEME.dmg`
signature=${signature%\" *}
signature=${signature#*=\"}
changelog=`cat CHANGELOG.md`
changelog=${changelog%%---*}
changelog=${changelog#*###}
changelog="###$changelog"
content="<!-- $build,$signature -->"
echo "$changelog$content" > CHANGELOG.md
- name: Release
uses: softprops/action-gh-release@v1
with:
body_path: CHANGELOG.md
files: ${{ env.APP_SCHEME }}.dmg
- name: Appcast
run: |
curl -u ZzzM:$GITPAGE_TOKEN -X POST \
https://api.github.com/repos/${{ github.repository }}/pages/builds \
-H "Accept: application/vnd.github.mister-fantastic-preview+json"
env:
APP_SCHEME: ${{ secrets.APP_SCHEME }}
GITPAGE_TOKEN: ${{ secrets.GITPAGE_TOKEN }}
SPARKLE_KEY: ${{ secrets.SPARKLE_KEY }}