-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (39 loc) · 1.85 KB
/
macos-alpha-release.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
name: macOS alpha release
on:
push:
branches:
- master
tags:
- v*
jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@master
- name: Set version for alpha release
run: /usr/libexec/PlistBuddy -c "Set :CFBundleVersion ${GITHUB_REF#refs/tags/v}" "Activity Logger/Activity Logger/Info.plist"
if: contains(github.ref, 'refs/tags/v')
- name: Build the App
run: cd 'Activity Logger/' && xcodebuild -target 'Activity Logger' -scheme 'Activity Logger' -configuration Release -archivePath build/activity-logger clean archive CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO
if: contains(github.ref, 'refs/tags/v')
- name: Export the App
run: cd 'Activity Logger/' && xcodebuild -exportArchive -exportOptionsPlist export-options.plist -archivePath build/activity-logger.xcarchive -exportPath archive/
if: contains(github.ref, 'refs/tags/v')
- name: Create tmp DMG image
run: hdiutil create /tmp/tmp.dmg -ov -volname "Activity Logger" -fs HFS+ -srcfolder 'Activity Logger/archive'
if: contains(github.ref, 'refs/tags/v')
- name: Create fixed DMG image
run: hdiutil convert /tmp/tmp.dmg -format UDZO -o "Activity Logger.dmg"
if: contains(github.ref, 'refs/tags/v')
- name: Install the hub command
run: curl -L -o /tmp/hub.tgz https://github.com/github/hub/releases/download/v2.12.3/hub-darwin-amd64-2.12.3.tgz
if: contains(github.ref, 'refs/tags/v')
- name: Extract the hub command
run: tar xf /tmp/hub.tgz
if: contains(github.ref, 'refs/tags/v')
- name: Create a new release via hub command
run: hub-*/bin/hub release create -a "Activity Logger.dmg" -m 'Alpha Release (macOS)' ${GITHUB_REF#refs/*/}
env:
GITHUB_USER: mazgi
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: contains(github.ref, 'refs/tags/v')