-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.drone.yml
123 lines (103 loc) · 2.46 KB
/
.drone.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
kind: pipeline
type: docker
name: Linux Build
volumes:
- name: build
host:
path: /mnt/Build
platform:
os: linux
steps:
- name: Compile Front End Assets
image: node:17
commands:
- npm install
- export NODE_OPTIONS=--openssl-legacy-provider && npm run prod
- name: Build Binary Files
image: electronuserland/builder
volumes:
- name: build
path: /drone/src/out
commands:
- apt-get update && apt-get install -y rpm fakeroot
- npm run make
trigger:
branch:
- master
event:
- tag
- custom
---
kind: pipeline
type: exec
name: Apple Build
workspace:
path: /tmp/droneworkspace/src
platform:
os: darwin
steps:
- name: Compile Front End Assets
commands:
- npm install
- npm run prod
- name: Build Binary Files
environment:
CI: 1
APPLE_ID:
from_secret: apple_id
APPLE_ID_PASSWORD:
from_secret: signing_key
commands:
- npm run make
- name: Sign
environment:
KEYCHAIN_CERTIFICATE_IDENTIFIER:
from_secret: keychain_certificate_identifier
commands:
- codesign --force --deep --sign "$KEYCHAIN_CERTIFICATE_IDENTIFIER" ./out/make/Volt-${DRONE_TAG}-arm64.dmg
- codesign --force --deep --sign "$KEYCHAIN_CERTIFICATE_IDENTIFIER" ./out/make/Volt-${DRONE_TAG}-x64.dmg
- name: Notarize
environment:
APPLE_ID:
from_secret: apple_id
APPLE_ID_PASSWORD:
from_secret: signing_key
commands:
- xcrun altool -t osx -f ./out/make/Volt-${DRONE_TAG}-arm64.dmg -primary-bundle-id com.dvigne.volt --notarize-app -username $APPLE_ID -p @env:APPLE_ID_PASSWORD
- xcrun altool -t osx -f ./out/make/Volt-${DRONE_TAG}-x64.dmg -primary-bundle-id com.dvigne.volt --notarize-app -username $APPLE_ID -p @env:APPLE_ID_PASSWORD
- name: Publish Artifacts
commands:
- cp -R -v ./out/make /Volumes/Build
trigger:
branch:
- master
event:
- tag
- custom
---
kind: pipeline
type: docker
name: Draft Release
volumes:
- name: artifacts
host:
path: /mnt/Build
steps:
- name: Publish Artifacts
image: plugins/github-release
volumes:
- name: artifacts
path: /out
settings:
draft: true
api_key:
from_secret: github_token
files:
- /out/make/*.dmg
- /out/make/*/*/*.deb
- /out/make/*/*/*.rpm
when:
event: tag
depends_on:
- Linux Build
- Apple Build