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 85785ad
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 22 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/generate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,17 @@ on: [push]
jobs:
test:
runs-on: macos-14
env:
MINT_PATH: "~/mint_cache"

steps:
- uses: actions/checkout@v1

- name: Generate project and run tests
run: |
export PATH=~/.rbenv/shims:"$PATH"
echo "$HOME/.local/share/mise/shims" >> $GITHUB_PATH
brew install cookiecutter rbenv mint fastlane &&
rbenv install 3.0.6 &&
brew install cookiecutter mise fastlane &&
mise settings set experimental true &&
cookiecutter --no-input -f . &&
cd Project &&
fastlane scan
mise install &&
fastlane scan --scheme project --project ./Project.xcodeproj
11 changes: 3 additions & 8 deletions hooks/post_gen_project.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
#!/bin/sh

# 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 +18,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

0 comments on commit 85785ad

Please sign in to comment.