fastlane configuration for macos.

This commit is contained in:
Herbert Poul
2024-02-04 16:50:55 +01:00
parent 2878ab7b72
commit 4f41b4a902
14 changed files with 320 additions and 60 deletions

View File

@ -1,4 +1,4 @@
name: iOS Build/Release
name: iOS und MacOS Build/Release
on:
workflow_dispatch:
@ -11,11 +11,16 @@ on:
branches:
- 'stable'
- 'beta'
- 'macos-stable'
jobs:
build:
runs-on: macos-latest
strategy:
matrix:
platform: ['ios', 'macos']
name: "Build ${{ matrix.platform }}"
steps:
- uses: actions/checkout@v3
with:
@ -25,9 +30,7 @@ jobs:
BLACKBOX_SECRET: ${{ secrets.BLACKBOX_SECRET_KEY }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
run: "./authpass/_tools/ci-install-deps.sh ios"
- name: 'ci-releaes ios'
- name: 'ci-release ${{ matrix.platform }}'
env:
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
run: "./authpass/_tools/ci-release.sh ios"
run: "./authpass/_tools/ci-release.sh ${{ matrix.platform }}"

3
.gitignore vendored
View File

@ -17,9 +17,6 @@ development_hp.dart
Runner.app.dSYM.zip
Runner.ipa
/flutter
/authpass/macos/vendor
/authpass/macos/Gemfile
/authpass/macos/Gemfile.lock
.flutter-plugins-dependencies
Flutter.podspec

View File

@ -46,8 +46,18 @@ if test "$target_platform" == "ios" ; then
popd
fi
if test "$target_platform" == "macos" ; then
eval $(ssh-agent -s)
cat _tools/secrets/fastlane_match_certificates_id_rsa | ssh-add -
set +x
# defines MATCH_PASSWORD and FASTLANE_PASSWORD
source _tools/secrets/fastlane_match_password
set -x
# make sure cocoapods is up to date.
pod repo update
pushd macos
sudo bundle install
popd
# # upgrade to flutter master channel
# flutter channel master
# flutter upgrade

View File

@ -83,12 +83,14 @@ case "${flavor}" in
# sed -i .bak "s/_DEFAULT_VERSION = '.*'/_DEFAULT_VERSION = '$version'/" lib/env/_base.dart
# sed -i .bak "s/_DEFAULT_BUILD_NUMBER = [0-9]*/_DEFAULT_BUILD_NUMBER = $buildnumber/" lib/env/_base.dart
# $FLT pub get
$FLT build macos -v -t lib/env/production.dart --release --build-number $buildnumber
echo
echo
echo 'Now opening workspace in xcode. Click Build -> Archive'
echo
open macos/Runner.xcworkspace
$FLT build macos -v -t lib/env/production.dart --release --build-number $buildnumber --config-only
cd macos
bundle exec fastlane beta
# echo
# echo
# echo 'Now opening workspace in xcode. Click Build -> Archive'
# echo
# open macos/Runner.xcworkspace
;;
samsungapps | huawei | sideload | amazon)
version=$(cat pubspec.yaml | grep version | cut -d' ' -f2 | cut -d'+' -f1)

View File

@ -33,7 +33,7 @@ keychain_password = SecureRandom.base64
create_keychain(
name: ENV["MATCH_KEYCHAIN_NAME"],
password: keychain_password,
default_keychain: true,
default_keychain: false,
unlock: true,
timeout: 3600,
add_to_search_list: true

3
authpass/macos/Gemfile Normal file
View File

@ -0,0 +1,3 @@
source "https://rubygems.org"
gem "fastlane"

213
authpass/macos/Gemfile.lock Normal file
View File

@ -0,0 +1,213 @@
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (3.0.6)
rexml
addressable (2.8.6)
public_suffix (>= 2.0.2, < 6.0)
artifactory (3.0.15)
atomos (0.1.3)
aws-eventstream (1.3.0)
aws-partitions (1.887.0)
aws-sdk-core (3.191.0)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.8)
jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.77.0)
aws-sdk-core (~> 3, >= 3.191.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.143.0)
aws-sdk-core (~> 3, >= 3.191.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.8)
aws-sigv4 (1.8.0)
aws-eventstream (~> 1, >= 1.0.2)
babosa (1.0.4)
claide (1.1.0)
colored (1.2)
colored2 (3.1.2)
commander (4.6.0)
highline (~> 2.0.0)
declarative (0.0.20)
digest-crc (0.6.5)
rake (>= 12.0.0, < 14.0.0)
domain_name (0.6.20240107)
dotenv (2.8.1)
emoji_regex (3.2.3)
excon (0.109.0)
faraday (1.10.3)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)
faraday-httpclient (~> 1.0)
faraday-multipart (~> 1.0)
faraday-net_http (~> 1.0)
faraday-net_http_persistent (~> 1.0)
faraday-patron (~> 1.0)
faraday-rack (~> 1.0)
faraday-retry (~> 1.0)
ruby2_keywords (>= 0.0.4)
faraday-cookie_jar (0.0.7)
faraday (>= 0.8.0)
http-cookie (~> 1.0.0)
faraday-em_http (1.0.0)
faraday-em_synchrony (1.0.0)
faraday-excon (1.1.0)
faraday-httpclient (1.0.1)
faraday-multipart (1.0.4)
multipart-post (~> 2)
faraday-net_http (1.0.1)
faraday-net_http_persistent (1.2.0)
faraday-patron (1.0.0)
faraday-rack (1.0.0)
faraday-retry (1.0.3)
faraday_middleware (1.2.0)
faraday (~> 1.0)
fastimage (2.3.0)
fastlane (2.219.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.8, < 3.0.0)
artifactory (~> 3.0)
aws-sdk-s3 (~> 1.0)
babosa (>= 1.0.3, < 2.0.0)
bundler (>= 1.12.0, < 3.0.0)
colored
commander (~> 4.6)
dotenv (>= 2.1.1, < 3.0.0)
emoji_regex (>= 0.1, < 4.0)
excon (>= 0.71.0, < 1.0.0)
faraday (~> 1.0)
faraday-cookie_jar (~> 0.0.6)
faraday_middleware (~> 1.0)
fastimage (>= 2.1.0, < 3.0.0)
gh_inspector (>= 1.1.2, < 2.0.0)
google-apis-androidpublisher_v3 (~> 0.3)
google-apis-playcustomapp_v1 (~> 0.1)
google-cloud-env (>= 1.6.0, < 2.0.0)
google-cloud-storage (~> 1.31)
highline (~> 2.0)
http-cookie (~> 1.0.5)
json (< 3.0.0)
jwt (>= 2.1.0, < 3)
mini_magick (>= 4.9.4, < 5.0.0)
multipart-post (>= 2.0.0, < 3.0.0)
naturally (~> 2.2)
optparse (>= 0.1.1)
plist (>= 3.1.0, < 4.0.0)
rubyzip (>= 2.0.0, < 3.0.0)
security (= 0.1.3)
simctl (~> 1.6.3)
terminal-notifier (>= 2.0.0, < 3.0.0)
terminal-table (~> 3)
tty-screen (>= 0.6.3, < 1.0.0)
tty-spinner (>= 0.8.0, < 1.0.0)
word_wrap (~> 1.0.0)
xcodeproj (>= 1.13.0, < 2.0.0)
xcpretty (~> 0.3.0)
xcpretty-travis-formatter (>= 0.0.3)
gh_inspector (1.1.3)
google-apis-androidpublisher_v3 (0.54.0)
google-apis-core (>= 0.11.0, < 2.a)
google-apis-core (0.11.3)
addressable (~> 2.5, >= 2.5.1)
googleauth (>= 0.16.2, < 2.a)
httpclient (>= 2.8.1, < 3.a)
mini_mime (~> 1.0)
representable (~> 3.0)
retriable (>= 2.0, < 4.a)
rexml
google-apis-iamcredentials_v1 (0.17.0)
google-apis-core (>= 0.11.0, < 2.a)
google-apis-playcustomapp_v1 (0.13.0)
google-apis-core (>= 0.11.0, < 2.a)
google-apis-storage_v1 (0.31.0)
google-apis-core (>= 0.11.0, < 2.a)
google-cloud-core (1.6.1)
google-cloud-env (>= 1.0, < 3.a)
google-cloud-errors (~> 1.0)
google-cloud-env (1.6.0)
faraday (>= 0.17.3, < 3.0)
google-cloud-errors (1.3.1)
google-cloud-storage (1.47.0)
addressable (~> 2.8)
digest-crc (~> 0.4)
google-apis-iamcredentials_v1 (~> 0.1)
google-apis-storage_v1 (~> 0.31.0)
google-cloud-core (~> 1.6)
googleauth (>= 0.16.2, < 2.a)
mini_mime (~> 1.0)
googleauth (1.8.1)
faraday (>= 0.17.3, < 3.a)
jwt (>= 1.4, < 3.0)
multi_json (~> 1.11)
os (>= 0.9, < 2.0)
signet (>= 0.16, < 2.a)
highline (2.0.3)
http-cookie (1.0.5)
domain_name (~> 0.5)
httpclient (2.8.3)
jmespath (1.6.2)
json (2.7.1)
jwt (2.7.1)
mini_magick (4.12.0)
mini_mime (1.1.5)
multi_json (1.15.0)
multipart-post (2.3.0)
nanaimo (0.3.0)
naturally (2.2.1)
optparse (0.4.0)
os (1.1.4)
plist (3.7.1)
public_suffix (5.0.4)
rake (13.1.0)
representable (3.2.0)
declarative (< 0.1.0)
trailblazer-option (>= 0.1.1, < 0.2.0)
uber (< 0.2.0)
retriable (3.1.2)
rexml (3.2.6)
rouge (2.0.7)
ruby2_keywords (0.0.5)
rubyzip (2.3.2)
security (0.1.3)
signet (0.18.0)
addressable (~> 2.8)
faraday (>= 0.17.5, < 3.a)
jwt (>= 1.5, < 3.0)
multi_json (~> 1.10)
simctl (1.6.10)
CFPropertyList
naturally
terminal-notifier (2.0.0)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
trailblazer-option (0.1.2)
tty-cursor (0.7.1)
tty-screen (0.8.2)
tty-spinner (0.9.3)
tty-cursor (~> 0.7)
uber (0.1.0)
unicode-display_width (2.5.0)
word_wrap (1.0.0)
xcodeproj (1.24.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.3.0)
rexml (~> 3.2.4)
xcpretty (0.3.0)
rouge (~> 2.0.7)
xcpretty-travis-formatter (1.0.1)
xcpretty (~> 0.2, >= 0.0.7)
PLATFORMS
arm64-darwin-23
ruby
DEPENDENCIES
fastlane
BUNDLED WITH
2.5.4

View File

@ -661,7 +661,7 @@
);
MACOSX_DEPLOYMENT_TARGET = 10.15;
PROVISIONING_PROFILE_SPECIFIER = "Mac App Store AuthPass Distribution Profile 2021";
"PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = "Mac App Store AuthPass Distribution Profile";
"PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = "match AppStore design.codeux.authpass macos";
SWIFT_VERSION = 5.0;
};
name = Release;

View File

@ -1,6 +1,5 @@
# app_identifier("[[APP_IDENTIFIER]]") # The bundle identifier of your app
# apple_id("[[APPLE_ID]]") # Your Apple email address
app_identifier("design.codeux.authpass")
apple_id("herbert.fastlane.uploader@codeux.design") # Your Apple email address
# For more information about the Appfile, see:
# https://docs.fastlane.tools/advanced/#appfile
#itc_team_id("827760") # App Store Connect Team ID
team_id("64ZPC769JY") # Developer Portal Team ID

View File

@ -13,17 +13,57 @@
# Uncomment the line if you want fastlane to automatically update itself
# update_fastlane
default_platform(:ios)
default_platform(:mac)
platform :ios do
keychain_password = SecureRandom.base64
platform :mac do
desc "Description of what the lane does"
lane :custom_lane do
# add actions here: https://docs.fastlane.tools/actions
end
lane :beta do
api_key = app_store_connect_api_key(
key_id: "S5PTZMY9P8",
issuer_id: "0f1ac0c6-ea92-4609-a2f0-c9b239198a75",
key_filepath: "./../_tools/secrets/AuthKey_S5PTZMY9P8.p8",
duration: 1200, # optional
in_house: false, # optional but may be required if using match/sigh
)
# https://docs.travis-ci.com/user/common-build-problems/#fastlane
create_keychain(
name: ENV["MATCH_KEYCHAIN_NAME"],
password: keychain_password,
default_keychain: false,
unlock: true,
timeout: 3600,
add_to_search_list: true
)
match(
type: "appstore",
keychain_name: ENV["MATCH_KEYCHAIN_NAME"],
keychain_password: keychain_password,
additional_cert_types: "mac_installer_distribution",
readonly: true
)
# # 2. Get installer distribution certificate
# match(
# type: "mac_installer_distribution",
# keychain_name: ENV["MATCH_KEYCHAIN_NAME"],
# keychain_password: keychain_password,
# readonly: true,
# platform: "macos",
# skip_provisioning_profiles: true,
# )
build_mac_app(workspace: "Runner.xcworkspace", scheme: "Runner")
if ENV["FASTLANE_SKIP_UPLOAD"] == "true"
puts "Skipping fastlane upload."
next
end
upload_to_testflight(api_key: api_key)
end
end
lane :notarize do
notarize(package: '../build/macos/Build/Products/Release/AuthPass.app', bundle_id: 'codeux.design.authpass')
end

View File

@ -1,10 +1,13 @@
git_url("git@gitlab.com:hpoul/authpass-certificates.git")
#git_url("git@gitlab.com:hpoul/authpass-certificates.git")
#git_branch("authpass_codeuxdesign")
git_url("git@gitlab.com:codeuxdesign/cux-certificates.git")
git_branch("cux_certificates")
storage_mode("git")
type("development") # The default type, can be: appstore, adhoc, enterprise or development
app_identifier(["design.codeux.authpass"])
# app_identifier(["tools.fastlane.app", "tools.fastlane.app2"])
# username("user@fastlane.tools") # Your Apple Developer Portal username
# For all available options run `fastlane match --help`

View File

@ -1,5 +0,0 @@
# Autogenerated by fastlane
#
# Ensure this file is checked in to source control!
gem 'fastlane-plugin-notarize'

View File

@ -1,37 +1,32 @@
fastlane documentation
================
----
# Installation
Make sure you have the latest version of the Xcode command line tools installed:
```
```sh
xcode-select --install
```
Install _fastlane_ using
```
[sudo] gem install fastlane -NV
```
or alternatively using `brew cask install fastlane`
For _fastlane_ installation instructions, see [Installing _fastlane_](https://docs.fastlane.tools/#installing-fastlane)
# Available Actions
### hptest
```
fastlane hptest
## Mac
### mac beta
```sh
[bundle exec] fastlane mac beta
```
----
## iOS
### ios custom_lane
```
fastlane ios custom_lane
```
Description of what the lane does
----
This README.md is auto-generated and will be re-generated every time [fastlane](https://fastlane.tools) is run.
More information about fastlane can be found on [fastlane.tools](https://fastlane.tools).
The documentation of fastlane can be found on [docs.fastlane.tools](https://docs.fastlane.tools).
This README.md is auto-generated and will be re-generated every time [_fastlane_](https://fastlane.tools) is run.
More information about _fastlane_ can be found on [fastlane.tools](https://fastlane.tools).
The documentation of _fastlane_ can be found on [docs.fastlane.tools](https://docs.fastlane.tools).

View File

@ -1,7 +1,7 @@
name: authpass
description: Password Manager with support for kdbx 3.x and 4.x
publish_to: none
version: 1.9.11+165
version: 1.9.12+166
environment:
sdk: '>=3.2.0 <4.0.0'