Skip to content

Commit

Permalink
Merge branch 'fastlane:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
TySmith17 authored Sep 27, 2024
2 parents e7c4003 + c7572d2 commit 68b63e7
Show file tree
Hide file tree
Showing 263 changed files with 4,690 additions and 1,593 deletions.
5 changes: 5 additions & 0 deletions .ci/bundler_version.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env ruby
file = File.join(__dir__, "..", "Gemfile.lock")
lines = File.read(file).split("\n")
idx = lines.index { |l| l == "BUNDLED WITH" }
puts lines[idx + 1].strip
27 changes: 27 additions & 0 deletions .ci/compatible_gem_version
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env ruby
#
# prints out the latest version number of the gem compatible with the given version of ruby
#
require 'net/http'
require 'json'

GEM_TO_TEST = "rubygems-update"

if ARGV.count > 0
RUBY_VERSION_TO_MATCH = ARGV[0]
else
RUBY_VERSION_TO_MATCH = RUBY_VERSION
end

API_URL = "https://rubygems.org/api/v1/versions/#{GEM_TO_TEST}.json"

# Load list of all available versions of GEM_TO_TEST
gem_versions = JSON.parse(Net::HTTP.get(URI(API_URL)))

# Process list to find matching Ruby version
matching_gem = gem_versions.find { |gem|
Gem::Dependency.new('', gem['ruby_version']).
match?('', RUBY_VERSION_TO_MATCH)
}

puts matching_gem['number']
55 changes: 16 additions & 39 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,11 @@ aliases:
run:
name: bundle install
command: |
gem update --system `.ci/compatible_gem_version`
gem install bundler -v $(cat Gemfile.lock | tail -1 | tr -d " ")
bundle config set --local path .bundle
bundle check || bundle install --jobs=4 --retry=3
bundle env
jobs:
tests_macos: &tests_macos_base
Expand Down Expand Up @@ -101,6 +103,7 @@ jobs:
- run:
name: bundle exec fastlane execute_tests
command: |
ulimit -n 65536 # allows us to stress test the system if we want
bundle exec fastlane snapshot reset_simulators --force
RUBYOPT=<< parameters.ruby_opt >> bundle exec fastlane execute_tests
- *cache_save_rubocop
Expand Down Expand Up @@ -177,19 +180,6 @@ jobs:
version: << parameters.ruby_version >>
- *bundle_install
- *cache_save_bundler
- run:
name: debug | brew version
command: |
brew -v
- run:
name: brew update if needed # temporary solution for this https://discuss.circleci.com/t/macos-image-users-homebrew-brownout-2021-04-26/39872/2
command: |
# if the version is not 3.x.x, try brew update
ruby -e 'exit(1) if `brew -v` =~ /2\.\d+\.\d+/' ||\
brew update || \
# if brew update fails due to shallow clone, try unshallowing and then brew update again
git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow && \
brew update
- run: bundle exec fastlane generate_swift_api

validate_documentation:
Expand All @@ -209,7 +199,7 @@ jobs:
- run:
name: Setup Build
command: |
gem update --system
gem update --system `.ci/compatible_gem_version`
- *bundle_install
- *cache_save_bundler

Expand Down Expand Up @@ -260,27 +250,10 @@ workflows:
version: 2
"Run Tests & Checks": # Name of the workflow, which ends up displayed on GitHub's PR Check
jobs:
- tests_macos:
name: 'Execute tests on macOS (Xcode 12.5.1, Ruby 2.6)'
xcode_version: '12.5.1'
ruby_version: '2.6.6'
<<: *important-branches
- tests_macos:
name: 'Execute tests on macOS (Xcode 12.5.1, Ruby 2.7)'
xcode_version: '12.5.1'
ruby_version: '2.7.3'
ruby_opt: -W:deprecated
<<: *important-branches
- tests_macos:
name: 'Execute tests on macOS (Xcode 13.4.1, Ruby 3.0)'
xcode_version: '13.4.1'
ruby_version: '3.0.4'
ruby_opt: -W:deprecated
<<: *important-branches
- tests_macos:
name: 'Execute tests on macOS (Xcode 13.4.1, Ruby 3.1)'
xcode_version: '13.4.1'
ruby_version: '3.1.2'
ruby_version: '3.1'
ruby_opt: -W:deprecated
- tests_macos:
name: 'Execute tests on macOS (Xcode 14.3.1, Ruby 3.1)'
Expand All @@ -292,11 +265,6 @@ workflows:
xcode_version: '15.0.1'
ruby_version: '3.1'
ruby_opt: -W:deprecated
- tests_macos:
name: 'Execute tests on macOS (Xcode 13.4.1, Ruby 3.1)'
xcode_version: '13.4.1'
ruby_version: '3.1'
ruby_opt: -W:deprecated
- tests_macos:
name: 'Execute tests on macOS (Xcode 14.3.1, Ruby 3.2)'
xcode_version: '14.3.1'
Expand All @@ -307,14 +275,23 @@ workflows:
xcode_version: '15.0.1'
ruby_version: '3.2'
ruby_opt: -W:deprecated
- tests_macos:
name: 'Execute tests on macOS (Xcode 15.2.0, Ruby 3.2)'
xcode_version: '15.2.0'
ruby_version: '3.2'
- tests_macos:
name: 'Execute tests on macOS (Xcode 15.3, Ruby 3.3)'
xcode_version: '15.3'
ruby_version: '3.3'
ruby_opt: -W:deprecated
- tests_ubuntu:
name: 'Execute tests on Ubuntu'
image: 'fastlanetools/ci:0.3.0'
ruby_version: '2.6'
- validate_fastlane_swift_generation:
name: 'Validate Fastlane.swift generation'
xcode_version: '12.5.1'
ruby_version: '2.7'
xcode_version: '15.0.1'
ruby_version: '3.2'
- validate_documentation:
name: 'Validate Documentation'
image: 'cimg/ruby:3.2.2'
Expand Down
103 changes: 103 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
# Configuration file for https://github.com/actions/labeler

"tool: action":
- changed-files:
- any-glob-to-any-file:
- fastlane/lib/fastlane/actions/**/*

"tool: cert":
- changed-files:
- any-glob-to-any-file:
- cert/**/*

"tool: deliver":
- changed-files:
- any-glob-to-any-file:
- deliver/**/*

"tool: fastlane_core":
- changed-files:
- any-glob-to-any-file:
- fastlane_core/**/*

"tool: frameit":
- changed-files:
- any-glob-to-any-file:
- frameit/**/*

"tool: gym":
- changed-files:
- any-glob-to-any-file:
- gym/**/*

"tool: match":
- changed-files:
- any-glob-to-any-file:
- match/**/*

"tool: pem":
- changed-files:
- any-glob-to-any-file:
- pem/**/*

"tool: pilot":
- changed-files:
- any-glob-to-any-file:
- pilot/**/*

"tool: precheck":
- changed-files:
- any-glob-to-any-file:
- precheck/**/*

"tool: produce":
- changed-files:
- any-glob-to-any-file:
- produce/**/*

"tool: scan":
- changed-files:
- any-glob-to-any-file:
- scan/**/*

"tool: screengrab":
- changed-files:
- any-glob-to-any-file:
- screengrab/**/*

"tool: sigh":
- changed-files:
- any-glob-to-any-file:
- sigh/**/*

"tool: snapshot":
- changed-files:
- any-glob-to-any-file:
- snapshot/**/*

"tool: spaceship":
- changed-files:
- any-glob-to-any-file:
- spaceship/**/*

"tool: supply":
- changed-files:
- any-glob-to-any-file:
- supply/**/*

"topic: swift":
- changed-files:
- any-glob-to-any-file:
- fastlane/swift/**/*

"tool: trainer":
- changed-files:
- any-glob-to-any-file:
- trainer/**/*

"type: ci":
- changed-files:
- any-glob-to-any-file:
- .github/**/*
- .circleci/**/*
- appveyor.yml
File renamed without changes.
28 changes: 28 additions & 0 deletions .github/workflows/create_tag_on_bump_merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Create Tag Version on Bump Merge

on:
pull_request:
types: [closed]

jobs:
version_bump:
if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'version-bump-2.221.0-')
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Read gem version
id: read_version
run: |
gemspec_file=$(ls *.gemspec)
version=$(grep -E "spec.version\s*=\s*['\"][0-9]+\.[0-9]+\.[0-9]+['\"]" $gemspec_file | grep -o -E "[0-9]+\.[0-9]+\.[0-9]+")
echo "version=$version" >> $GITHUB_ENV
- name: Create Tag
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git tag -a v${{ env.version }} -m "Version ${{ env.version }}"
git push origin --tags
23 changes: 23 additions & 0 deletions .github/workflows/deploy_to_rubygems.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Deploy to RubyGems
on:
release:
types:
- published
workflow_dispatch:

jobs:
deploy-to-rubygems:
name: Deploy to RubyGems
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: '3.2'
- uses: rubygems/release-gem@v1
16 changes: 16 additions & 0 deletions .github/workflows/pull_request_labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: "Pull Request Labeler"
on:
pull_request_target:
types:
- opened
- synchronize # Add labels when PR receives new commits, which may modify the files in the PR
- reopened

jobs:
labeler:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v5
49 changes: 49 additions & 0 deletions .github/workflows/release_step_1_create_version_bump.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
name: Release Step 1 - Create Version Bump

on:
workflow_dispatch:
inputs:
bump_type:
description: 'Bump type'
required: true
type: choice
options:
- patch
- minor
- major

permissions:
contents: write
pull-requests: write

jobs:
create_version_bump:
runs-on: macos-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2

- name: Install fastlane
run: bundle install

- name: Run fastlane bump
run: |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
bundle exec fastlane bump bump_type:${{ github.event.inputs.bump_type }}
env:
GITHUB_USER_NAME: fastlane # Todo: This is needed for docs - remove somehow
GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Todo: This is needed for docs - remove somehow
GITHUB_API_BEARER: ${{ secrets.GITHUB_TOKEN }}
FL_GITHUB_RELEASE_API_BEARER: ${{ secrets.GITHUB_TOKEN }}
FL_CHANGELOG_SLEEP: 10
FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT: 180
FASTLANE_XCODEBUILD_SETTINGS_RETRIES: 5

Loading

0 comments on commit 68b63e7

Please sign in to comment.