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 595512d
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 26 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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ Here are some of the key features of this project template:

### Prerequisites

Make sure that `cookiecutter` and `mint` tools are installed. Preferred way to make it is using homebrew.
Make sure that `cookiecutter` and `mise` tools are installed. Preferred way to make it is using homebrew.

```sh
brew install cookiecutter mint
brew install cookiecutter mise
```

### Bootstrap a new project
Expand Down
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 595512d

Please sign in to comment.