-
Notifications
You must be signed in to change notification settings - Fork 498
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
191 changed files
with
5,903 additions
and
368 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
name: Build alpha release | ||
|
||
on: | ||
|
||
# Triggers the workflow on any pull request | ||
pull_request: | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
env: | ||
# Make the git branch for a PR available to our Fastfile | ||
MX_GIT_BRANCH: ${{ github.event.pull_request.head.ref }} | ||
|
||
jobs: | ||
build: | ||
name: Release | ||
runs-on: macos-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
# Common cache | ||
# Note: GH actions do not support yaml anchor yet. We need to duplicate this for every job | ||
- name: Cache CocoaPods libraries | ||
uses: actions/cache@v2 | ||
with: | ||
path: Pods | ||
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-pods- | ||
- name: Cache Ruby gems | ||
uses: actions/cache@v2 | ||
with: | ||
path: vendor/bundle | ||
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-gems- | ||
# Make sure we use the latest version of MatrixKit | ||
- name: Reset MatrixKit pod | ||
run: rm -rf Pods/MatrixKit | ||
|
||
# Common setup | ||
# Note: GH actions do not support yaml anchor yet. We need to duplicate this for every job | ||
- name: Bundle install | ||
run: | | ||
bundle config path vendor/bundle | ||
bundle install --jobs 4 --retry 3 | ||
- name: Use right MatrixKit and MatrixSDK versions | ||
run: bundle exec fastlane point_dependencies_to_related_branches | ||
|
||
# Import alpha release private signing certificate | ||
- name: Import signing certificate | ||
uses: apple-actions/import-codesign-certs@v1 | ||
with: | ||
p12-file-base64: ${{ secrets.ALPHA_CERTIFICATES_P12 }} | ||
p12-password: ${{ secrets.ALPHA_CERTIFICATES_P12_PASSWORD }} | ||
|
||
# Main step | ||
# The Ad-hoc release link will be referenced as 'DIAWI_FILE_LINK' | ||
# and QR link as 'DIAWI_QR_CODE_LINK' when the Diawi upload succeed | ||
- name: Build Ad-hoc release and send it to Diawi | ||
run: bundle exec fastlane alpha | ||
env: | ||
# Automaticaly bypass 2FA upgrade if possible on Apple account. | ||
SPACESHIP_SKIP_2FA_UPGRADE: true | ||
APPLE_ID: ${{ secrets.FASTLANE_USER }} | ||
FASTLANE_USER: ${{ secrets.FASTLANE_USER }} | ||
FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }} | ||
DIAWI_API_TOKEN: ${{ secrets.DIAWI_API_TOKEN }} | ||
|
||
- name: Add or update PR comment with Ad-hoc release informations | ||
uses: NejcZdovc/comment-pr@v1 | ||
with: | ||
message: | | ||
:iphone: Scan the QR code below to install the build for this PR. | ||
:lock: This build is for internal testing purpose. Only devices listed in the ad-hoc provisioning profile can install Element Alpha. | ||
![QR code](${{ env.DIAWI_QR_CODE_LINK }}) | ||
If you can't scan the QR code you can install the build via this link: ${{ env.DIAWI_FILE_LINK }} | ||
# Enables to identify and update existing Ad-hoc release message on new commit in the PR | ||
identifier: "GITHUB_COMMENT_ADHOC_RELEASE" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// | ||
// Copyright 2021 Vector Creations Ltd | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
|
||
// Version | ||
MARKETING_VERSION = 1.5.2 | ||
CURRENT_PROJECT_VERSION = 1.5.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// | ||
// Copyright 2021 New Vector Ltd | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
|
||
import Foundation | ||
import UIKit | ||
|
||
// Figma Avatar Sizes: https://www.figma.com/file/X4XTH9iS2KGJ2wFKDqkyed/Compound?node-id=1258%3A19678 | ||
public enum AvatarSize: Int { | ||
case xxSmall = 16 | ||
case xSmall = 32 | ||
case small = 36 | ||
case medium = 42 | ||
case large = 44 | ||
case xLarge = 52 | ||
case xxLarge = 80 | ||
} | ||
|
||
extension AvatarSize { | ||
public var size: CGSize { | ||
return CGSize(width: self.rawValue, height: self.rawValue) | ||
} | ||
} |
Oops, something went wrong.