Commit 03e37a3 1 parent 690c795 commit 03e37a3 Copy full SHA for 03e37a3
File tree 2 files changed +41
-2
lines changed
2 files changed +41
-2
lines changed Original file line number Diff line number Diff line change
1
+ name : Makefile CI
2
+
3
+ on :
4
+ push :
5
+ branches : [ "main" ]
6
+ pull_request :
7
+ branches : [ "main" ]
8
+
9
+ jobs :
10
+ build :
11
+
12
+ runs-on : self-hosted
13
+
14
+ steps :
15
+ - uses : actions/checkout@v3
16
+
17
+ - name : Build
18
+ env :
19
+ CI_KEYCHAIN_SECRET : ${{ secrets.CI_KEYCHAIN_SECRET }}
20
+ run : make build ci-sign BUILD_ARGS='$(RELEASE_BUILD_ARGS)' CODESIGN_IDENTITY="ci0.code.beeper-tools.com" KC_PASSWORD=$CI_KEYCHAIN_SECRET KC_PATH=ci.keychain
21
+
22
+ - name : Locate build artifact
23
+ run : cp $(make --silent product-path BUILD_ARGS='$(RELEASE_BUILD_ARGS)') barcelona-mautrix
24
+
25
+ - name : ' Upload barcelona-mautrix'
26
+ uses : actions/upload-artifact@v3
27
+ with :
28
+ name : barcelona-mautrix
29
+ path : barcelona-mautrix
30
+ retention-days : 45
Original file line number Diff line number Diff line change 1
1
RELEASE_BUILD_ARGS =--configuration release --arch arm64 --arch x86_64
2
2
DEBUG_BUILD_ARGS =--configuration debug
3
- BUILD_ARGS =$(DEBUG_BUILD_ARGS )
3
+ BUILD_ARGS? =$(DEBUG_BUILD_ARGS )
4
4
BINARY_PATH =$(shell swift build $(BUILD_ARGS ) --show-bin-path)
5
5
6
6
CODESIGN_IDENTITY? ="-"
7
7
ENTITLEMENTS_PATH =$(PWD ) /Sources/barcelona-mautrix/barcelona-mautrix.entitlements
8
+ KC_PASSWORD? =""
9
+ KC_PATH? =login.keychain
8
10
9
11
sign :
10
- codesign -fs $(CODESIGN_IDENTITY ) --entitlements $(ENTITLEMENTS_PATH ) $(BINARY_PATH ) /barcelona-mautrix
12
+ codesign -fs $(CODESIGN_IDENTITY ) --keychain " $( KC_PATH) " --entitlements $(ENTITLEMENTS_PATH ) $(BINARY_PATH ) /barcelona-mautrix
13
+
14
+ ci-sign :
15
+ security unlock-keychain -p $(KC_PASSWORD ) ci.keychain
16
+ make sign
11
17
12
18
build :
13
19
swift build $(BUILD_ARGS )
14
20
21
+ product-path :
22
+ echo $(BINARY_PATH ) /barcelona-mautrix
23
+
15
24
all : build sign
You can’t perform that action at this time.
0 commit comments