Add job for public beta deployment (#600)

Closes #599
This commit is contained in:
Davide 2024-09-24 11:17:52 +02:00 committed by GitHub
parent ccc0cd7ce0
commit a665670cf7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 41 additions and 34 deletions

View File

@ -22,26 +22,13 @@ jobs:
strategy:
fail-fast: true
matrix:
#name: ["iOS", "macOS", "tvOS"]
name: ["iOS", "macOS"]
include:
- name: "iOS"
platform: "ios"
- name: "macOS"
platform: "macos"
#- name: "tvOS"
# platform: "tvos"
#platform: ["iOS", "macOS", "tvOS"]
platform: ["iOS", "macOS"]
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
- uses: passepartoutvpn/action-prepare-xcode-build@master
with:
bundler-cache: true
- name: Access private repositories
env:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
run: |
git config --global url.https://$ACCESS_TOKEN@github.com/.insteadOf git@github.com:
- name: Upload ${{ matrix.name }} app
access_token: ${{ secrets.ACCESS_TOKEN }}
- name: Upload ${{ matrix.platform }} app
id: upload_app
timeout-minutes: 15
env:
@ -55,3 +42,22 @@ jobs:
run: |
ci/recognize-match-hostname.sh
bundle exec fastlane --env ${{ matrix.platform }} beta
distribute_public_beta:
name: Distribute Public Beta
runs-on: ubuntu-latest
needs: build_upload
environment:
name: public_beta
url: "https://testflight.apple.com/join/K71mtLjZ"
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Publish on TestFlight
run: |
#PLATFORMS=("iOS" "macOS" "tvOS")
PLATFORMS=("iOS" "macOS")
for PLATFORM in ${PLATFORMS[@]}; do
bundle exec fastlane --env $PLATFORM public_beta
done

View File

@ -20,18 +20,9 @@ jobs:
runs-on: macos-14
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
- uses: passepartoutvpn/action-prepare-xcode-build@master
with:
bundler-cache: true
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: 15.4
- name: Access private repositories
env:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
run: |
git config --global url.https://$ACCESS_TOKEN@github.com/.insteadOf git@github.com:
access_token: ${{ secrets.ACCESS_TOKEN }}
- name: Run tests
run: |
cd Passepartout/Library

View File

@ -38,13 +38,15 @@ final class IssueTests: XCTestCase {
#endif
}
func test_givenAppLine_whenCreateIssue_thenCollectsAppOSAndDevice() {
let issue = Issue(appLine: "Passepartout 1.2.3", purchasedProducts: [])
XCTAssertEqual(issue.appLine, "Passepartout 1.2.3")
func test_givenAppLine_whenCreateIssue_thenCollectsAppLine() {
let appLine = "Passepartout 1.2.3"
let issue = Issue(appLine: appLine, purchasedProducts: [])
XCTAssertEqual(issue.appLine, appLine)
}
func test_givenAppLineAndProducts_whenCreateIssue_thenMatchesTemplate() {
let issue = Issue(appLine: "Passepartout 1.2.3", purchasedProducts: [.Features.appleTV])
let appLine = "Passepartout 1.2.3"
let issue = Issue(appLine: appLine, purchasedProducts: [.Features.appleTV])
let expected = """
Hi,
@ -52,7 +54,7 @@ Hi,
--
App: Passepartout 1.2.3
App: \(issue.appLine ?? "unknown")
OS: \(issue.osLine)
Device: \(issue.deviceLine ?? "unknown")
Provider: none (last updated: unknown)

View File

@ -2,5 +2,6 @@ LC_ALL="en_US.UTF-8"
LANG="en_US.UTF-8"
GYM_SCHEME="Passepartout"
FL_VERSION_NUMBER_TARGET="Passepartout"
FL_BUILD_NUMBER_PROJECT="Passepartout.xcodeproj"
PILOT_BETA_APP_DESCRIPTION="Passepartout is your go-to app for VPN and privacy."

View File

@ -2,3 +2,4 @@ MATCH_PLATFORM="ios"
GYM_SDK="iphoneos"
GYM_DESTINATION="generic/platform=iOS"
GYM_OUTPUT_DIRECTORY="dist/ios"
PILOT_PLATFORM="ios"

View File

@ -3,3 +3,4 @@ MATCH_ADDITIONAL_CERT_TYPES="mac_installer_distribution"
GYM_SDK="macosx"
GYM_DESTINATION="generic/platform=macOS"
GYM_OUTPUT_DIRECTORY="dist/macos"
PILOT_PLATFORM="osx"

View File

@ -2,3 +2,4 @@ MATCH_PLATFORM="tvos"
GYM_SDK="appletvos"
GYM_DESTINATION="generic/platform=tvOS"
GYM_OUTPUT_DIRECTORY="dist/tvos"
PILOT_PLATFORM="appletvos"

View File

@ -64,7 +64,11 @@ end
desc "Distribute to Public Beta"
lane :public_beta do
version = get_version_number
build = get_build_number
pilot(
app_version: version,
build_number: build,
distribute_only: true,
distribute_external: true,
notify_external_testers: true