generated from nimblehq/git-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
35 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,40 +13,40 @@ jobs: | |
runs-on: macos-latest | ||
timeout-minutes: 30 | ||
steps: | ||
- name: Check out | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
submodules: "recursive" | ||
# - name: Check out | ||
# uses: actions/checkout@v3 | ||
# with: | ||
# ref: ${{ github.head_ref }} | ||
# submodules: "recursive" | ||
|
||
- name: Preserve the ArkanaKeys (avoid code change in git when refreshing the "sample" project) | ||
run: mv -f ./sample/ios/ArkanaKeys ../ | ||
# - name: Preserve the ArkanaKeys (avoid code change in git when refreshing the "sample" project) | ||
# run: mv -f ./sample/ios/ArkanaKeys ../ | ||
|
||
- name: Remove the old sample project | ||
run: rm -rf sample | ||
# - name: Remove the old sample project | ||
# run: rm -rf sample | ||
|
||
- name: Generate the new sample project | ||
run: ./make.sh --bundle-id co.nimblehq.kmm.template --bundle-id-staging co.nimblehq.kmm.template.staging --project-name sample --ios-version 14.0 | ||
# - name: Generate the new sample project | ||
# run: ./make.sh --bundle-id co.nimblehq.kmm.template --bundle-id-staging co.nimblehq.kmm.template.staging --project-name sample --ios-version 14.0 | ||
|
||
- name: Restore the previous ArkanaKeys's keys | ||
run: | | ||
rm -rf ./sample/ios/ArkanaKeys | ||
mv -f ../ArkanaKeys ./sample/ios | ||
# - name: Restore the previous ArkanaKeys's keys | ||
# run: | | ||
# rm -rf ./sample/ios/ArkanaKeys | ||
# mv -f ../ArkanaKeys ./sample/ios | ||
|
||
- id: changes | ||
name: Check for changes in the sample project | ||
run: | | ||
count=$(git status sample --porcelain | wc -l) | ||
echo "count=$count" >> $GITHUB_OUTPUT | ||
# - id: changes | ||
# name: Check for changes in the sample project | ||
# run: | | ||
# count=$(git status sample --porcelain | wc -l) | ||
# echo "count=$count" >> $GITHUB_OUTPUT | ||
|
||
- name: Commit & push the sample project changes | ||
if: steps.changes.outputs.count > 0 | ||
run: | | ||
git config user.name team-nimblehq | ||
git config user.email [email protected] | ||
git add sample | ||
git commit -m "[Chore] Generate & update sample project" | ||
git push | ||
# - name: Commit & push the sample project changes | ||
# if: steps.changes.outputs.count > 0 | ||
# run: | | ||
# git config user.name team-nimblehq | ||
# git config user.email [email protected] | ||
# git add sample | ||
# git commit -m "[Chore] Generate & update sample project" | ||
# git push | ||
|
||
android_test: | ||
needs: [generate_sample] | ||
|
@@ -166,6 +166,13 @@ jobs: | |
# - name: Clean up previous code coverage report | ||
# run: bundle exec fastlane cleanUpOutput | ||
|
||
- name: Fix running Danger SwiftFormat from non-root directory | ||
run: | | ||
gem which danger | ||
gem which danger-swiftformat | ||
# Insert a map operator in the "find_swift_files" method to remove "sample/ios/" prefix from all files. | ||
sed -i '' "s/.uniq/.uniq.map { |file| file.partition('sample\/ios\/').last }/g" '/Users/luongvo/.rvm/gems/ruby-3.0.0/gems/danger-swiftformat-0.8.1/lib/swiftformat/plugin.rb' | ||
- name: Run Danger to wrap up the review | ||
env: | ||
DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|