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: strategy:
fail-fast: true fail-fast: true
matrix: matrix:
#name: ["iOS", "macOS", "tvOS"] #platform: ["iOS", "macOS", "tvOS"]
name: ["iOS", "macOS"] platform: ["iOS", "macOS"]
include:
- name: "iOS"
platform: "ios"
- name: "macOS"
platform: "macos"
#- name: "tvOS"
# platform: "tvos"
steps: steps:
- uses: actions/checkout@v4 - uses: passepartoutvpn/action-prepare-xcode-build@master
- uses: ruby/setup-ruby@v1
with: with:
bundler-cache: true access_token: ${{ secrets.ACCESS_TOKEN }}
- name: Access private repositories - name: Upload ${{ matrix.platform }} app
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
id: upload_app id: upload_app
timeout-minutes: 15 timeout-minutes: 15
env: env:
@ -55,3 +42,22 @@ jobs:
run: | run: |
ci/recognize-match-hostname.sh ci/recognize-match-hostname.sh
bundle exec fastlane --env ${{ matrix.platform }} beta 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 runs-on: macos-14
timeout-minutes: 15 timeout-minutes: 15
steps: steps:
- uses: actions/checkout@v4 - uses: passepartoutvpn/action-prepare-xcode-build@master
- uses: ruby/setup-ruby@v1
with: with:
bundler-cache: true access_token: ${{ secrets.ACCESS_TOKEN }}
- 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:
- name: Run tests - name: Run tests
run: | run: |
cd Passepartout/Library cd Passepartout/Library

View File

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

View File

@ -2,5 +2,6 @@ LC_ALL="en_US.UTF-8"
LANG="en_US.UTF-8" LANG="en_US.UTF-8"
GYM_SCHEME="Passepartout" GYM_SCHEME="Passepartout"
FL_VERSION_NUMBER_TARGET="Passepartout"
FL_BUILD_NUMBER_PROJECT="Passepartout.xcodeproj" FL_BUILD_NUMBER_PROJECT="Passepartout.xcodeproj"
PILOT_BETA_APP_DESCRIPTION="Passepartout is your go-to app for VPN and privacy." 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_SDK="iphoneos"
GYM_DESTINATION="generic/platform=iOS" GYM_DESTINATION="generic/platform=iOS"
GYM_OUTPUT_DIRECTORY="dist/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_SDK="macosx"
GYM_DESTINATION="generic/platform=macOS" GYM_DESTINATION="generic/platform=macOS"
GYM_OUTPUT_DIRECTORY="dist/macos" GYM_OUTPUT_DIRECTORY="dist/macos"
PILOT_PLATFORM="osx"

View File

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

View File

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