Skip to content

Commit

Permalink
fix: actions
Browse files Browse the repository at this point in the history
  • Loading branch information
YumNumm committed Jul 11, 2023
1 parent bb193b4 commit 13abf8b
Show file tree
Hide file tree
Showing 11 changed files with 115 additions and 154 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/android-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Flutter build Android(r)

on:
push:
branches: [main, android, feature/v2]
branches: [main]
workflow_dispatch:

jobs:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/arv-updater.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ name: Arv Updator
on:
#ソースをmainブランチにプッシュする時
schedule:
- cron: "0 0 * * 0" # Everyday At 00:00
# Every Sunday at 00:00
- cron: "0 0 * * 0"
workflow_dispatch:

env:
Expand All @@ -23,7 +24,7 @@ jobs:
with:
fetch-depth: 1

- name: Set up Python ${{ matrix.python-version }}
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
Expand Down
43 changes: 19 additions & 24 deletions .github/workflows/auto-format.yaml
Original file line number Diff line number Diff line change
@@ -1,54 +1,49 @@
name: Auto Format

# ref: https://qiita.com/blendthink/items/48e6c4b2c0f016da8c72

on:
push:
pull_request:

env:
# フォーマット対象のパス
FORMAT_PATHS: "."

jobs:
auto-format:
format:
runs-on: ubuntu-latest
timeout-minutes: 15
timeout-minutes: 10

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

# https://github.com/kuhnroyal/flutter-fvm-config-action
- name: Fetch flutter config
uses: kuhnroyal/flutter-fvm-config-action@v1

# https://github.com/subosito/flutter-action
- name: Set up flutter
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: ${{ env.FLUTTER_CHANNEL }}
cache: true
cache-key: ${{ env.FLUTTER_VERSION }}-${{ env.FLUTTER_CHANNEL }}

- name: Flutter version
run: flutter --version
- name: Install dependencies
run: |
flutter pub get
- name: Format
run: dart format $FORMAT_PATHS
run: |
files=$(find lib test -name "*.dart" -not \( -name "*.*freezed.dart" -o -name "*.*g.dart" -o -name "*.gen.dart" \))
for file in $files; do
# limit jobs to 5
if [ "$(jobs -r | wc -l)" -ge 5 ]; then
wait "$(jobs -r -p | head -1)"
fi
dart fix --apply "$file" &
done
wait
dart format "$files"
# 変更が発生した場合は プルリクエストを作成
- name: Create pull request
uses: peter-evans/create-pull-request@v4
with:
delete-branch: true
# base branch name (GITHUB_REF_NAME)
commit-message: "Auto format"
committer: "GitHub Actions <noreply@github.com>"
base: ${{ github.head_ref }}
branch: "auto-format/${{ github.sha }}"
title: "Auto format - ref: ${{ github.ref_name }}"
body: "Auto format by GitHub Actions on ${{ github.sha }}\nby: ${{github.actor}}"


62 changes: 62 additions & 0 deletions .github/workflows/ios-beta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: iOS CI
#発火条件
on:
workflow_dispatch:
push:
branches: [main, develop]

jobs:
build:
#ビルド環境
runs-on: macos-latest
# タイムアウト時間を設定
timeout-minutes: 45

steps:
#リポジトリからソースをダンロード
- uses: actions/checkout@v2

- name: Install brew packages
run: brew bundle

- name: Restore direnv to use fastlane
run: |
echo 'eval "$(direnv hook bash)"' >> ~/.bash_profile
source ~/.bash_profile
echo ${{ secrets.ENVRC }} | base64 -d > .envrc
direnv allow .
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable

- name: Show Xcode version
run: xcodebuild -version

- name: Fetch flutter config
uses: kuhnroyal/flutter-fvm-config-action@v1

- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: ${{ env.FLUTTER_CHANNEL }}
cache: true


- name: Flutter version
run: flutter --version

- name: Flutter dependencies install
run: flutter pub get

- name: Generate codes with build_runner
run: |
echo '${{ secrets.ENV }}' | base64 -d > .env
flutter pub run build_runner build -d
- name: build
run: flutter build ios --release --no-codesign --obfuscate --split-debug-info=obfuscate/android

- name: fastlane
run: cd ios && bundle exec fastlane beta
90 changes: 0 additions & 90 deletions .github/workflows/ios-ci.yaml

This file was deleted.

19 changes: 0 additions & 19 deletions .github/workflows/loxcan.yaml

This file was deleted.

15 changes: 6 additions & 9 deletions .github/workflows/tag-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ on:


jobs:
release:
release-ios:
runs-on: macos-latest
timeout-minutes: 45

release-android:
runs-on: ubuntu-latest
strategy:
fail-fast: true
Expand Down Expand Up @@ -88,7 +92,7 @@ jobs:
flutter build apk \
--release \
--obfuscate \
--split-debug-info=obfuscate/android
--split-debug-info=obfuscate/android
else
flutter build apk \
--release \
Expand Down Expand Up @@ -125,13 +129,6 @@ jobs:
run: |
firebase crashlytics:symbols:upload --app=1:179553945248:android:11ffcfb483c098ad6fabc5 obfuscate/android
# - uses: codecov/codecov-action@v3
# with:
# token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
# fail_ci_if_error: false # optional (default = false)
# verbose: true # optional (default = false)
# file: ~/coverage/lcov.info

#-- Slack通知 --#
# 成功
- name: Slack Notification on Success
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,9 @@ ios/Runner/GoogleService-Info.plist
macos/Runner/GoogleService-Info.plist
macos/Runner/GoogleService-Info.plist
ios/GoogleService-Info.plist

.envrc
ios/production_net.yumnumm.eqmonitor_ios*
macos/GoogleService-Info.plist
ios/fastlane/report.xml
ios/fastlane/report.xml

2 changes: 1 addition & 1 deletion ios/fastlane/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
report.xml
screenshots
metadata
metadata
11 changes: 11 additions & 0 deletions ios/fastlane/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,17 @@ For _fastlane_ installation instructions, see [Installing _fastlane_](https://do

# Available Actions

### prepare

```sh
[bundle exec] fastlane prepare
```

Prepare the iOS app for dev or build

----


## iOS

### ios beta
Expand Down
17 changes: 10 additions & 7 deletions ios/fastlane/report.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,37 @@



<testcase classname="fastlane.lanes" name="0: default_platform" time="0.000303">
<testcase classname="fastlane.lanes" name="0: default_platform" time="0.000228">

</testcase>


<testcase classname="fastlane.lanes" name="1: get_push_certificate" time="14.262744">
<testcase classname="fastlane.lanes" name="1: latest_testflight_build_number" time="6.661843">

</testcase>


<testcase classname="fastlane.lanes" name="2: latest_testflight_build_number" time="3.663962">
<testcase classname="fastlane.lanes" name="2: increment_build_number" time="1.575661">

</testcase>


<testcase classname="fastlane.lanes" name="3: increment_build_number" time="2.682379">
<testcase classname="fastlane.lanes" name="3: match" time="3.545775">

</testcase>


<testcase classname="fastlane.lanes" name="4: match" time="23.942487">
<testcase classname="fastlane.lanes" name="4: build_app" time="101.512884">

</testcase>


<testcase classname="fastlane.lanes" name="5: build_app" time="15.544867">
<testcase classname="fastlane.lanes" name="5: changelog_from_git_commits" time="0.065191">

<failure message="/opt/homebrew/Cellar/fastlane/2.213.0/libexec/gems/fastlane-2.213.0/fastlane/lib/fastlane/actions/actions_helper.rb:67:in `execute_action&apos;&#10;/opt/homebrew/Cellar/fastlane/2.213.0/libexec/gems/fastlane-2.213.0/fastlane/lib/fastlane/runner.rb:255:in `block in execute_action&apos;&#10;/opt/homebrew/Cellar/fastlane/2.213.0/libexec/gems/fastlane-2.213.0/fastlane/lib/fastlane/runner.rb:229:in `chdir&apos;&#10;/opt/homebrew/Cellar/fastlane/2.213.0/libexec/gems/fastlane-2.213.0/fastlane/lib/fastlane/runner.rb:229:in `execute_action&apos;&#10;/opt/homebrew/Cellar/fastlane/2.213.0/libexec/gems/fastlane-2.213.0/fastlane/lib/fastlane/runner.rb:157:in `trigger_action_by_name&apos;&#10;/opt/homebrew/Cellar/fastlane/2.213.0/libexec/gems/fastlane-2.213.0/fastlane/lib/fastlane/fast_file.rb:159:in `method_missing&apos;&#10;Fastfile:33:in `block (2 levels) in parsing_binding&apos;&#10;/opt/homebrew/Cellar/fastlane/2.213.0/libexec/gems/fastlane-2.213.0/fastlane/lib/fastlane/lane.rb:33:in `call&apos;&#10;/opt/homebrew/Cellar/fastlane/2.213.0/libexec/gems/fastlane-2.213.0/fastlane/lib/fastlane/runner.rb:49:in `block in execute&apos;&#10;/opt/homebrew/Cellar/fastlane/2.213.0/libexec/gems/fastlane-2.213.0/fastlane/lib/fastlane/runner.rb:45:in `chdir&apos;&#10;/opt/homebrew/Cellar/fastlane/2.213.0/libexec/gems/fastlane-2.213.0/fastlane/lib/fastlane/runner.rb:45:in `execute&apos;&#10;/opt/homebrew/Cellar/fastlane/2.213.0/libexec/gems/fastlane-2.213.0/fastlane/lib/fastlane/lane_manager.rb:47:in `cruise_lane&apos;&#10;/opt/homebrew/Cellar/fastlane/2.213.0/libexec/gems/fastlane-2.213.0/fastlane/lib/fastlane/command_line_handler.rb:36:in `handle&apos;&#10;/opt/homebrew/Cellar/fastlane/2.213.0/libexec/gems/fastlane-2.213.0/fastlane/lib/fastlane/commands_generator.rb:110:in `block (2 levels) in run&apos;&#10;/opt/homebrew/Cellar/fastlane/2.213.0/libexec/gems/commander-4.6.0/lib/commander/command.rb:187:in `call&apos;&#10;/opt/homebrew/Cellar/fastlane/2.213.0/libexec/gems/commander-4.6.0/lib/commander/command.rb:157:in `run&apos;&#10;/opt/homebrew/Cellar/fastlane/2.213.0/libexec/gems/commander-4.6.0/lib/commander/runner.rb:444:in `run_active_command&apos;&#10;/opt/homebrew/Cellar/fastlane/2.213.0/libexec/gems/fastlane-2.213.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:124:in `run!&apos;&#10;/opt/homebrew/Cellar/fastlane/2.213.0/libexec/gems/commander-4.6.0/lib/commander/delegates.rb:18:in `run!&apos;&#10;/opt/homebrew/Cellar/fastlane/2.213.0/libexec/gems/fastlane-2.213.0/fastlane/lib/fastlane/commands_generator.rb:354:in `run&apos;&#10;/opt/homebrew/Cellar/fastlane/2.213.0/libexec/gems/fastlane-2.213.0/fastlane/lib/fastlane/commands_generator.rb:43:in `start&apos;&#10;/opt/homebrew/Cellar/fastlane/2.213.0/libexec/gems/fastlane-2.213.0/fastlane/lib/fastlane/cli_tools_distributor.rb:123:in `take_off&apos;&#10;/opt/homebrew/Cellar/fastlane/2.213.0/libexec/gems/fastlane-2.213.0/bin/fastlane:23:in `&lt;top (required)&gt;&apos;&#10;/opt/homebrew/Cellar/fastlane/2.213.0/libexec/bin/fastlane:25:in `load&apos;&#10;/opt/homebrew/Cellar/fastlane/2.213.0/libexec/bin/fastlane:25:in `&lt;main&gt;&apos;&#10;&#10;Error building the application - see the log above" />
</testcase>


<testcase classname="fastlane.lanes" name="6: upload_to_testflight" time="515.333172">

</testcase>

Expand Down

0 comments on commit 13abf8b

Please sign in to comment.