-
-
Notifications
You must be signed in to change notification settings - Fork 109
130 lines (124 loc) · 4.95 KB
/
develop-push.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
124
125
126
127
128
129
130
# build a new alpha release
name: develop-push
# Controls when the action will run.
on:
# Triggers the workflow on push
push:
branches: [ develop ]
workflow_dispatch:
permissions: {}
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
buildAndPublishAlpha:
# The type of runner that the job will run on
runs-on: ['ARM64', 'self-hosted']
outputs:
id: ${{ steps.changelog.outputs.id }}
timestamp: ${{ steps.changelog.outputs.timestamp }}
message: ${{ steps.changelog.outputs.message }}
env:
APP_NAME: "Monal.Alpha"
BUILD_SCHEME: "Monal Alpha"
APP_DIR: "Monal.alpha.app"
BUILD_TYPE: "Alpha"
ALPHA_UPLOAD_SECRET: ${{ secrets.ALPHA_UPLOAD_SECRET }}
EXPORT_OPTIONS_CATALYST_APP_EXPORT: "../scripts/exportOptions/Alpha_Catalyst_ExportOptions.plist"
EXPORT_OPTIONS_IOS: "../scripts/exportOptions/Alpha_iOS_ExportOptions.plist"
permissions:
actions: write # needed to upload artifacts
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v4
with:
clean: true
submodules: true
fetch-depth: 100
fetch-tags: true
show-progress: true
lfs: true
- name: Checkout submodules
run: git submodule update -f --init --remote
- name: Import TURN secrets
run: |
if [[ -e "/Users/ci/secrets.monal_alpha" ]]; then
echo "#import \"/Users/ci/secrets.monal_alpha\"" > Monal/Classes/secrets.h
fi
- name: Write git hash include
run: |
echo "Current commit hash: $(git show-ref --hash --abbrev refs/heads/develop)"
echo "#define ALPHA_COMMIT_HASH \"$(git show-ref --hash --abbrev refs/heads/develop)\"" > Monal/Classes/commitHash.h
- name: Make our build scripts executable
run: chmod +x ./scripts/build.sh
- name: Run build
run: ./scripts/build.sh
- run: |
cd Monal/build/app/tar_release
tar -cf "../$APP_NAME.tar" "$APP_DIR"
cd ../../../..
- name: save changelog
id: changelog
env:
ID: ${{github.event.head_commit.id}}
TIMESTAMP: ${{github.event.head_commit.timestamp}}
MESSAGE: ${{github.event.head_commit.message}}
run: |
echo "ID: $ID" > changes.txt
echo "Timestamp: $TIMESTAMP" >> changes.txt
echo "$MESSAGE" >> changes.txt
echo "id=$ID" >> "$GITHUB_OUTPUT"
echo "timestamp=$TIMESTAMP" >> "$GITHUB_OUTPUT"
echo "message<<__EOF__" >> "$GITHUB_OUTPUT"
echo "$MESSAGE" >> "$GITHUB_OUTPUT"
echo "__EOF__" >> "$GITHUB_OUTPUT"
- name: Uploading to alpha site
run: ./scripts/uploadAlpha.sh
- name: Notarize catalyst
run: xcrun notarytool submit ./Monal/build/app/Monal.alpha.zip --wait --team-id S8D843U34Y --key "/Users/ci/appstoreconnect/apiKey.p8" --key-id "$(cat /Users/ci/appstoreconnect/apiKeyId.txt)" --issuer "$(cat /Users/ci/appstoreconnect/apiIssuerId.txt)"
- name: Update monal homebrew alpha repo
run: scripts/updateAlphaHomebrew.sh
- uses: actions/upload-artifact@v4
with:
name: monal-catalyst
path: "Monal/build/app/Monal.alpha.tar"
if-no-files-found: error
- uses: actions/upload-artifact@v4
with:
name: monal-ios
path: "Monal/build/ipa/Monal.alpha.ipa"
if-no-files-found: error
# - uses: actions/upload-artifact@v4
# with:
# name: monal-catalyst-dsym
# path: Monal/build/macos_Monal.xcarchive/dSYMs
# if-no-files-found: error
# - uses: actions/upload-artifact@v4
# with:
# name: monal-ios-dsym
# path: Monal/build/ios_Monal.xcarchive/dSYMs
# if-no-files-found: error
# - name: Update translations
# run: |
# chmod +x ./scripts/updateLocalization.sh
# chmod +x ./scripts/xliff_extractor.py
# ./scripts/updateLocalization.sh NOCOMMIT
notifyMuc:
name: Notify support MUC about new Alpharelease
runs-on: ubuntu-latest
needs: [buildAndPublishAlpha]
steps:
- name: Notify
uses: monal-im/xmpp-notifier@master
with: # Set the secrets as inputs
jid: ${{ secrets.BOT_JID }}
password: ${{ secrets.BOT_PASSWORD }}
server_host: ${{ secrets.BOT_SERVER }}
recipient: [email protected]
recipient_is_room: true
bot_alias: "Monal Release Bot"
message: |
New alpha build based on the following commit:
${{ needs.buildAndPublishAlpha.outputs.id }}
${{ needs.buildAndPublishAlpha.outputs.timestamp }}
${{ needs.buildAndPublishAlpha.outputs.message }}
Download page: https://downloads.monal-im.org/monal-im/alpha/