-
Notifications
You must be signed in to change notification settings - Fork 132
85 lines (69 loc) · 2.16 KB
/
cd.yml
File metadata and controls
85 lines (69 loc) · 2.16 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: Release
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
- '[0-9]+.[0-9]+.[0-9]+rc[0-9]+'
jobs:
build:
strategy:
fail-fast: true
runs-on: macos-11
steps:
- uses: actions/checkout@v2
- name: Configure Signing
uses: Apple-Actions/import-codesign-certs@v1
with:
p12-file-base64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }}
p12-password: ${{ secrets.P12_PASSWORD }}
- name: Xcode Select
uses: devbotsxyz/xcode-select@v1.1.0
with:
version: latest
- name: Generate Metadata
id: metadata
run: |
[[ "$GITHUB_REF" =~ refs/tags ]] && VERSION=${GITHUB_REF/refs\/tags\//} || exit
echo ::set-output name=version::${VERSION}
echo ::set-output name=archive_name::xchtmlreport-${VERSION}.zip
- name: Build
run: swift build -v -c release
- name: Sign
run: |
codesign --verbose --verify --options=runtime -f \
-s "Developer ID Application: Tyler Vick (${{ secrets.AC_TEAM_ID }})" \
.build/x86_64-apple-macosx/release/xchtmlreport
- name: Verify
run: |
codesign -vvv --deep --strict .build/x86_64-apple-macosx/release/xchtmlreport
- name: Package
run: |
ditto -c -k \
--keepParent ".build/x86_64-apple-macosx/release/xchtmlreport" \
${{ steps.metadata.outputs.archive_name }}
- name: Notarize
run: |
xcrun notarytool submit ${{ steps.metadata.outputs.archive_name }} \
--apple-id ${{ secrets.AC_USERNAME }} \
--password ${{ secrets.AC_PASSWORD }} \
--team-id ${{ secrets.AC_TEAM_ID }} \
--wait
- name: Archive
uses: actions/upload-artifact@v2
with:
name: application
path: ${{ steps.metadata.outputs.archive_name }}
release:
runs-on: macos-11
needs: build
steps:
- name: Download
uses: actions/download-artifact@v2
- name: Release
uses: softprops/action-gh-release@v1
with:
prerelease: ${{ contains(github.ref, '-') }}
files: |
application/xchtmlreport-*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}