forked from PlayCover/PlayCover
-
Notifications
You must be signed in to change notification settings - Fork 12
75 lines (66 loc) · 2.04 KB
/
1.build_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
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
70
71
72
73
74
75
name: Build & Release macOS App
on:
push:
tags:
- "*"
env:
CI: true
jobs:
build:
runs-on: macos-12
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Get the version
id: tag_version
run: echo ::set-output name=TAG_NAME::${GITHUB_REF/refs\/tags\//}
- name: Install dependencies
shell: bash
run: |
brew install graphicsmagick imagemagick
bundle install
npm install --global create-dmg
- name: Fastlane Release
shell: bash
run: fastlane release
env:
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT: 120 # x86 is slooooooow
- name: Exract API_KEY
shell: bash
run: 'echo "$API_KEY" > apikey.json'
env:
API_KEY: ${{secrets.APPLE_API_KEY_JSON}}
- name: Create DMG
shell: bash
run: |
create-dmg ./output/PlayCover.app ./output
mv ./output/*.dmg ./output/PlayCover_${{ env.TAG_NAME }}.dmg
env:
TAG_NAME: ${{ steps.tag_version.outputs.TAG_NAME }}
- name: Notarize DMG
shell: bash
run: |
fastlane notarize_dmg package:output/PlayCover_${{ env.TAG_NAME }}.dmg
env:
TAG_NAME: ${{ steps.tag_version.outputs.TAG_NAME }}
- name: Clean Up
shell: bash
run: rm apikey.json
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: PlayCover_${{ env.TAG_NAME }}.dmg
path: output/PlayCover_${{ env.TAG_NAME }}.dmg
env:
TAG_NAME: ${{ steps.tag_version.outputs.TAG_NAME }}
- name: Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
with:
draft: true
files: |
output/PlayCover_${{ env.TAG_NAME }}.dmg
env:
TAG_NAME: ${{ steps.tag_version.outputs.TAG_NAME }}