chore: fix GitHub CI

This commit is contained in:
CMK 2022-10-08 14:01:21 +08:00
parent fa27a28a60
commit e7509dcd7a
5 changed files with 26 additions and 11 deletions

7
.env.example Normal file
View File

@ -0,0 +1,7 @@
# Required
# https://<your-domain>/relay-to/development
NotificationEndpointDebug=""
# https://<your-domain>/relay-to/production
NotificationEndpointRelease=""

View File

@ -9,8 +9,7 @@ gem install bundler:2.3.11
# Install Ruby Gems # Install Ruby Gems
bundle install bundle install
# stub keys. DO NOT use in production # Setup notification endpoint
bundle exec pod keys set notification_endpoint "<endpoint>" bundle exec arkana
bundle exec pod keys set notification_endpoint_debug "<endpoint>"
bundle exec pod install bundle exec pod install

View File

@ -22,6 +22,9 @@ jobs:
- name: force Xcode 13.2.1 - name: force Xcode 13.2.1
run: sudo xcode-select -switch /Applications/Xcode_13.2.1.app run: sudo xcode-select -switch /Applications/Xcode_13.2.1.app
- name: setup - name: setup
env:
NotificationEndpointDebug: ${{ secrets.NotificationEndpointDebug }}
NotificationEndpointRelease: ${{ secrets.NotificationEndpointRelease }}
run: exec ./.github/scripts/setup.sh run: exec ./.github/scripts/setup.sh
- name: build - name: build
run: exec ./.github/scripts/build.sh run: exec ./.github/scripts/build.sh

View File

@ -1,8 +1,9 @@
# Acknowledgments # Acknowledgments
- [Alamofire](https://github.com/Alamofire/Alamofire)
- [AlamofireImage](https://github.com/Alamofire/AlamofireImage) - [AlamofireImage](https://github.com/Alamofire/AlamofireImage)
- [AlamofireNetworkActivityIndicator](https://github.com/Alamofire/AlamofireNetworkActivityIndicator) - [AlamofireNetworkActivityIndicator](https://github.com/Alamofire/AlamofireNetworkActivityIndicator)
- [Alamofire](https://github.com/Alamofire/Alamofire) - [Arkana](https://github.com/rogerluan/arkana)
- [CommonOSLog](https://github.com/mainasuk/CommonOSLog) - [CommonOSLog](https://github.com/mainasuk/CommonOSLog)
- [CryptoSwift](https://github.com/krzyzanowskim/CryptoSwift) - [CryptoSwift](https://github.com/krzyzanowskim/CryptoSwift)
- [DateToolSwift](https://github.com/MatthewYork/DateTools) - [DateToolSwift](https://github.com/MatthewYork/DateTools)
@ -26,10 +27,10 @@
- [SwiftGen](https://github.com/SwiftGen/SwiftGen) - [SwiftGen](https://github.com/SwiftGen/SwiftGen)
- [SwiftUI-Introspect](https://github.com/siteline/SwiftUI-Introspect) - [SwiftUI-Introspect](https://github.com/siteline/SwiftUI-Introspect)
- [SwiftyJSON](https://github.com/SwiftyJSON/SwiftyJSON) - [SwiftyJSON](https://github.com/SwiftyJSON/SwiftyJSON)
- [Tabman](https://github.com/uias/Tabman)
- [TabBarPager](https://github.com/TwidereProject/TabBarPager) - [TabBarPager](https://github.com/TwidereProject/TabBarPager)
- [TwidereX-iOS](https://github.com/TwidereProject/TwidereX-iOS) - [Tabman](https://github.com/uias/Tabman)
- [ThirdPartyMailer](https://github.com/vtourraine/ThirdPartyMailer) - [ThirdPartyMailer](https://github.com/vtourraine/ThirdPartyMailer)
- [TOCropViewController](https://github.com/TimOliver/TOCropViewController) - [TOCropViewController](https://github.com/TimOliver/TOCropViewController)
- [TwidereX-iOS](https://github.com/TwidereProject/TwidereX-iOS)
- [TwitterProfile](https://github.com/OfTheWolf/TwitterProfile) - [TwitterProfile](https://github.com/OfTheWolf/TwitterProfile)
- [UITextView-Placeholder](https://github.com/devxoul/UITextView-Placeholder) - [UITextView-Placeholder](https://github.com/devxoul/UITextView-Placeholder)

View File

@ -12,7 +12,7 @@ Intell the latest version of Xcode from the App Store or Apple Developer Downloa
This guide may not suit your machine and actually setup procedure may change in the future. Please file the issue or Pull Request if there are any problems. This guide may not suit your machine and actually setup procedure may change in the future. Please file the issue or Pull Request if there are any problems.
## CocoaPods ## CocoaPods
The app use [CocoaPods]() and [CocoaPods-Keys](https://github.com/orta/cocoapods-keys). Ruby Gems are managed through Bundler. The M1 Mac needs virtual ruby env to workaround compatibility issues. The app use [CocoaPods]() and [Arkana](https://github.com/rogerluan/arkana). Ruby Gems are managed through Bundler. The M1 Mac needs virtual ruby env to workaround compatibility issues.
#### Intel Mac #### Intel Mac
@ -50,6 +50,12 @@ bundle install
```zsh ```zsh
# make a clean build # make a clean build
bundle install bundle install
# setup notification endpoint
# please check the `.env.example` to create your's or use the empty example directly
bundle exec arkana -e `<your-dot-env-file-path>`
# clean pods
bundle exec pod clean bundle exec pod clean
# make install # make install
@ -64,9 +70,8 @@ The CocoaPods-Key plugin will request the push notification endpoint. You can fu
The app requires the `App Group` capability. To make sure it works for your developer membership. Please check [AppSecret.swift](../AppShared/AppSecret.swift) file and set another unique `groupID` and update `App Group` settings. The app requires the `App Group` capability. To make sure it works for your developer membership. Please check [AppSecret.swift](../AppShared/AppSecret.swift) file and set another unique `groupID` and update `App Group` settings.
#### Push Notification (Optional) #### Push Notification (Optional)
The app is compatible with [toot-relay](https://github.com/DagAgren/toot-relay) APNs. You can set your push notification endpoint via Cocoapod-Keys. There are two endpoints: The app is compatible with [toot-relay](https://github.com/DagAgren/toot-relay) APNs. You can set your push notification endpoint via Arkana. There are one endpoint:
- notification_endpoint: for `RELEASE` usage - NotificationEndpoint: (e.g. https://<your-domain>/relay-to/production)
- notification_endpoint_debug: for `DEBUG` usage
Please check the [Establishing a Certificate-Based Connection to APNs Please check the [Establishing a Certificate-Based Connection to APNs
](https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/establishing_a_certificate-based_connection_to_apns) document to generate the certificate and exports the p12 file. ](https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/establishing_a_certificate-based_connection_to_apns) document to generate the certificate and exports the p12 file.