Skip to content

Commit

Permalink
Edit github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexey Korolev committed Nov 8, 2024
1 parent b585f4f commit abba49f
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 24 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/generate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,17 @@ on: [push]

jobs:
test:
runs-on: macos-14
env:
MINT_PATH: "~/mint_cache"
runs-on: macos-15

steps:
- uses: actions/checkout@v1

- name: Generate project and run tests
run: |
export PATH=~/.rbenv/shims:"$PATH"
brew install cookiecutter rbenv mint fastlane &&
rbenv install 3.0.6 &&
brew install cookiecutter mise fastlane &&
mise settings set experimental true &&
mise activate --shims &&
cookiecutter --no-input -f . &&
cd Project &&
mise install &&
fastlane scan
14 changes: 6 additions & 8 deletions hooks/post_gen_project.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
#!/bin/sh

# Install all dependencies
mise install

# Generate xcodeproj file
make project
mise exec -- xcodegen

# Download .gitignore file
curl -L 'https://www.gitignore.io/api/swift,macos,fastlane' > .gitignore
echo '.cache' >> .gitignore
{% if cookiecutter.ignore_xcproject == "Yes" %}
echo '{{ cookiecutter.name }}.xcodeproj' >> .gitignore
echo '{{ cookiecutter.name }}.xcworkspace' >> .gitignore
{% endif %}

echo 'Pods' >> .gitignore

make fmt
make gems
mise run fmt

# Stamp current version of xcode in .xcode-version file
xcodebuild -version | sed 's/Xcode //' | head -n 1 > .xcode-version
Expand All @@ -23,4 +21,4 @@ git init
git add .
git commit -m "Initial commit"

mise generate pre-commit
mise generate git-pre-commit --write
7 changes: 4 additions & 3 deletions {{ cookiecutter.name }}/.mise.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
[tasks]
lint = "swiftformat GrowFood --lint"
fmt = "swiftformat GrowFood"
pre-commit = "swiftformat {{ cookiecutter.name }} {{ cookiecutter.name }}Tests --lint"
fmt = "swiftformat {{ cookiecutter.name }} {{ cookiecutter.name }}Tests"

[tools]
xcodes = "1.5.0"
"spm:nicklockwood/SwiftFormat" = "0.54.6"
swiftformat = "0.54.6"
xcodegen = "latest"
1 change: 0 additions & 1 deletion {{ cookiecutter.name }}/.ruby-version

This file was deleted.

3 changes: 0 additions & 3 deletions {{ cookiecutter.name }}/Gemfile

This file was deleted.

1 change: 0 additions & 1 deletion {{ cookiecutter.name }}/project.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
name: {{ cookiecutter.name }}
options:
postGenCommand: "make pods"
deploymentTarget:
iOS: {{ cookiecutter.deployment_target }}
developmentLanguage: ru
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import UIKit

@MainActor
private let kHideKeyboardDelegate = HideKeyboardDelegate()

private class HideKeyboardDelegate: NSObject, UIGestureRecognizerDelegate {
Expand All @@ -20,4 +21,3 @@ extension UIViewController {
view.addGestureRecognizer(tapGesture)
}
}

0 comments on commit abba49f

Please sign in to comment.