diff --git a/.github/ISSUE_TEMPLATE/1-Feature.yaml b/.github/ISSUE_TEMPLATE/1-Feature.yaml new file mode 100644 index 0000000..e7972fa --- /dev/null +++ b/.github/ISSUE_TEMPLATE/1-Feature.yaml @@ -0,0 +1,16 @@ +name: 機能追加 +description: 機能追加のIssue +title: "【FEAT】" +labels: [enhancement] +projects: [] +assignees: + - mrs1669 +body: + - type: textarea + id: content + attributes: + label: 概要 + description: 追加したい機能の説明をお願いします + placeholder: 〜機能を作成しました + validations: + required: true \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/2-Fix.yaml b/.github/ISSUE_TEMPLATE/2-Fix.yaml new file mode 100644 index 0000000..015006e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/2-Fix.yaml @@ -0,0 +1,16 @@ +name: バグ修正 +description: バグのIssue +title: "【FIX】" +labels: [bug] +projects: [] +assignees: + - mrs1669 +body: + - type: textarea + id: content + attributes: + label: 概要 + description: バグ・修正したい機能の説明をお願いします + placeholder: バグ内容 + validations: + required: true \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/3-Refactor.yaml b/.github/ISSUE_TEMPLATE/3-Refactor.yaml new file mode 100644 index 0000000..ccf2213 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/3-Refactor.yaml @@ -0,0 +1,16 @@ +name: リファクタリング +description: リファクタリングのIssue +title: "【REFACTOR】" +labels: [] +projects: [] +assignees: + - mrs1669 +body: + - type: textarea + id: content + attributes: + label: 概要 + description: 内容を説明してください + placeholder: 〜をリファクタリングしました + validations: + required: true \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/4-Chore.yaml b/.github/ISSUE_TEMPLATE/4-Chore.yaml new file mode 100644 index 0000000..9c90674 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/4-Chore.yaml @@ -0,0 +1,16 @@ +name: 軽作業 +description: 軽作業のIssue +title: "【CHORE】" +labels: [] +projects: [] +assignees: + - mrs1669 +body: + - type: textarea + id: content + attributes: + label: 概要 + description: 作業内容を説明してください + placeholder: 〜をしました + validations: + required: true \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/5-BumpUp.yaml b/.github/ISSUE_TEMPLATE/5-BumpUp.yaml new file mode 100644 index 0000000..ae98dd8 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/5-BumpUp.yaml @@ -0,0 +1,17 @@ +name: バージョンアップ +description: バージョンアップのIssue +title: "【UPDATE】Bump up version to v" +labels: [update] +projects: [] +assignees: + - mrs1669 +body: + - type: textarea + id: content + attributes: + label: 概要 + description: 前後のバージョンの記載をお願いします + value: v → v + placeholder: "例: v1.1.0 → v1.2.0" + validations: + required: true \ No newline at end of file diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..ed5700d --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,23 @@ + +## 概要 (Abstract) + + + +## 関連するISSUE +- resolve # + +## 詳細 (Detail) + + + \ No newline at end of file diff --git a/.github/workflows/archive-develop.yml b/.github/workflows/archive-develop.yml new file mode 100644 index 0000000..e595b83 --- /dev/null +++ b/.github/workflows/archive-develop.yml @@ -0,0 +1,61 @@ +name: Archive + +on: + push: + branches: develop + +jobs: + build: + name: develop + runs-on: macos-latest + + steps: + - uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: latest-stable + + - name: Checkout + uses: actions/checkout@v4 + + - name: ci_post_clone + run: | + defaults write com.apple.dt.Xcode IDESkipPackagePluginFingerprintValidatation -bool YES + + - name: Set Default Scheme + run: | + scheme_list=$(xcodebuild -list -json | tr -d "\n") + default=$(echo $scheme_list | ruby -e "require 'json'; puts JSON.parse(STDIN.gets)['project']['targets'][0]") + echo $default | cat >default + echo Using default scheme: $default + + - name: Archive Project + run: | + if [ "`ls -A | grep -i \\.xcworkspace\$`" ]; then filetype_parameter="workspace" && file_to_build="`ls -A | grep -i \\.xcworkspace\$`"; else filetype_parameter="project" && file_to_build="`ls -A | grep -i \\.xcodeproj\$`"; fi + scheme_list=$(xcodebuild -list -json | tr -d "\n") + default=$(echo $scheme_list | ruby -e "require 'json'; puts JSON.parse(STDIN.gets)['project']['targets'][0]") + xcodebuild archive -"$filetype_parameter" "$file_to_build" \ + -scheme $default \ + -sdk iphoneos \ + -configuration Release \ + -archivePath build.xcarchive \ + CODE_SIGNING_ALLOWED=NO + + - name: Create ExportOptions.plist + run: | + echo '${{ secrets.EXPORT_OPTIONS }}' > ExportOptions.plist + + - name: Create Private Key + run: | + mkdir private_keys + echo -n '${{ secrets.APPLE_API_KEY_BASE64 }}' | base64 --decode > ./private_keys/AuthKey_${{ secrets.APPLE_API_ISSUER_ID }}.p8 + + - name: Export IPA + run: | + xcodebuild -exportArchive \ + -archivePath build.xcarchive \ + -exportOptionsPlist ExportOptions.plist \ + -exportPath app.ipa \ + -allowProvisioningUpdates \ + -authenticationKeyPath `pwd`/private_keys/AuthKey_${{ secrets.APPLE_API_ISSUER_ID }}.p8 \ + -authenticationKeyID ${{ secrets.APPLE_API_KEY_ID }} \ + -authenticationKeyIssuerID ${{ secrets.APPLE_API_ISSUER_ID }} \ No newline at end of file diff --git a/.github/workflows/archive-main.yml b/.github/workflows/archive-main.yml new file mode 100644 index 0000000..075678b --- /dev/null +++ b/.github/workflows/archive-main.yml @@ -0,0 +1,61 @@ +name: Archive + +on: + push: + branches: main + +jobs: + build: + name: main + runs-on: macos-latest + + steps: + - uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: latest-stable + + - name: Checkout + uses: actions/checkout@v4 + + - name: ci_post_clone + run: | + defaults write com.apple.dt.Xcode IDESkipPackagePluginFingerprintValidatation -bool YES + + - name: Set Default Scheme + run: | + scheme_list=$(xcodebuild -list -json | tr -d "\n") + default=$(echo $scheme_list | ruby -e "require 'json'; puts JSON.parse(STDIN.gets)['project']['targets'][0]") + echo $default | cat >default + echo Using default scheme: $default + + - name: Archive Project + run: | + if [ "`ls -A | grep -i \\.xcworkspace\$`" ]; then filetype_parameter="workspace" && file_to_build="`ls -A | grep -i \\.xcworkspace\$`"; else filetype_parameter="project" && file_to_build="`ls -A | grep -i \\.xcodeproj\$`"; fi + scheme_list=$(xcodebuild -list -json | tr -d "\n") + default=$(echo $scheme_list | ruby -e "require 'json'; puts JSON.parse(STDIN.gets)['project']['targets'][0]") + xcodebuild archive -"$filetype_parameter" "$file_to_build" \ + -scheme $default \ + -sdk iphoneos \ + -configuration Release \ + -archivePath build.xcarchive \ + CODE_SIGNING_ALLOWED=NO + + - name: Create ExportOptions.plist + run: | + echo '${{ secrets.EXPORT_OPTIONS }}' > ExportOptions.plist + + - name: Create Private Key + run: | + mkdir private_keys + echo -n '${{ secrets.APPLE_API_KEY_BASE64 }}' | base64 --decode > ./private_keys/AuthKey_${{ secrets.APPLE_API_ISSUER_ID }}.p8 + + - name: Export IPA + run: | + xcodebuild -exportArchive \ + -archivePath build.xcarchive \ + -exportOptionsPlist ExportOptions.plist \ + -exportPath app.ipa \ + -allowProvisioningUpdates \ + -authenticationKeyPath `pwd`/private_keys/AuthKey_${{ secrets.APPLE_API_ISSUER_ID }}.p8 \ + -authenticationKeyID ${{ secrets.APPLE_API_KEY_ID }} \ + -authenticationKeyIssuerID ${{ secrets.APPLE_API_ISSUER_ID }} \ No newline at end of file diff --git a/.github/workflows/archive-working.yml b/.github/workflows/archive-working.yml new file mode 100644 index 0000000..6e6b383 --- /dev/null +++ b/.github/workflows/archive-working.yml @@ -0,0 +1,65 @@ +name: Archive + +on: + push: + branches: + - '**' + - '!main' + - '!develop' + +jobs: + build: + name: working + runs-on: macos-latest + + steps: + - uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: latest-stable + + - name: Checkout + uses: actions/checkout@v4 + + - name: ci_post_clone + run: | + defaults write com.apple.dt.Xcode IDESkipPackagePluginFingerprintValidatation -bool YES + + - name: Set Default Scheme + run: | + scheme_list=$(xcodebuild -list -json | tr -d "\n") + echo "$scheme_list" + default=$(echo $scheme_list | ruby -e "require 'json'; puts JSON.parse(STDIN.gets)['project']['targets'][0]") + echo $default | cat >default + echo Using default scheme: $default + + - name: Archive Project + run: | + if [ "`ls -A | grep -i \\.xcworkspace\$`" ]; then filetype_parameter="workspace" && file_to_build="`ls -A | grep -i \\.xcworkspace\$`"; else filetype_parameter="project" && file_to_build="`ls -A | grep -i \\.xcodeproj\$`"; fi + scheme_list=$(xcodebuild -list -json | tr -d "\n") + default=$(echo $scheme_list | ruby -e "require 'json'; puts JSON.parse(STDIN.gets)['project']['targets'][0]") + xcodebuild archive -"$filetype_parameter" "$file_to_build" \ + -scheme $default \ + -sdk iphoneos \ + -configuration Release \ + -archivePath build.xcarchive \ + CODE_SIGNING_ALLOWED=NO + + - name: Create ExportOptions.plist + run: | + echo '${{ secrets.EXPORT_OPTIONS }}' > ExportOptions.plist + + - name: Create Private Key + run: | + mkdir private_keys + echo -n '${{ secrets.APPLE_API_KEY_BASE64 }}' | base64 --decode > ./private_keys/AuthKey_${{ secrets.APPLE_API_ISSUER_ID }}.p8 + + - name: Export IPA + run: | + xcodebuild -exportArchive \ + -archivePath build.xcarchive \ + -exportOptionsPlist ExportOptions.plist \ + -exportPath app.ipa \ + -allowProvisioningUpdates \ + -authenticationKeyPath `pwd`/private_keys/AuthKey_${{ secrets.APPLE_API_ISSUER_ID }}.p8 \ + -authenticationKeyID ${{ secrets.APPLE_API_KEY_ID }} \ + -authenticationKeyIssuerID ${{ secrets.APPLE_API_ISSUER_ID }} \ No newline at end of file diff --git a/.github/workflows/build-develop.yml b/.github/workflows/build-develop.yml new file mode 100644 index 0000000..50cccf7 --- /dev/null +++ b/.github/workflows/build-develop.yml @@ -0,0 +1,41 @@ +name: Build + +on: + push: + branches: develop + +jobs: + build: + name: develop + runs-on: macos-latest + + steps: + - uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: latest-stable + + - name: Checkout + uses: actions/checkout@v4 + + - name: ci_post_clone + run: | + defaults write com.apple.dt.Xcode IDESkipPackagePluginFingerprintValidatation -bool YES + + - name: Set Default Scheme + run: | + scheme_list=$(xcodebuild -list -json | tr -d "\n") + default=$(echo $scheme_list | ruby -e "require 'json'; puts JSON.parse(STDIN.gets)['project']['targets'][0]") + echo $default | cat >default + echo Using default scheme: $default + + - name: Build + env: + scheme: ${{ 'default' }} + platform: ${{ 'iOS Simulator' }} + run: | + # xcrun xctrace returns via stderr, not the expected stdout (see https://developer.apple.com/forums/thread/663959) + device=`xcrun xctrace list devices 2>&1 | grep -oE 'iPhone.*?[^\(]+' | head -1 | awk '{$1=$1;print}' | sed -e "s/ Simulator$//"` + if [ $scheme = default ]; then scheme=$(cat default); fi + if [ "`ls -A | grep -i \\.xcworkspace\$`" ]; then filetype_parameter="workspace" && file_to_build="`ls -A | grep -i \\.xcworkspace\$`"; else filetype_parameter="project" && file_to_build="`ls -A | grep -i \\.xcodeproj\$`"; fi + file_to_build=`echo $file_to_build | awk '{$1=$1;print}'` + xcodebuild build-for-testing -scheme "$scheme" -"$filetype_parameter" "$file_to_build" -destination "platform=$platform,name=$device" diff --git a/.github/workflows/build-main.yml b/.github/workflows/build-main.yml new file mode 100644 index 0000000..c598d4a --- /dev/null +++ b/.github/workflows/build-main.yml @@ -0,0 +1,41 @@ +name: Build + +on: + push: + branches: main + +jobs: + build: + name: main + runs-on: macos-latest + + steps: + - uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: latest-stable + + - name: Checkout + uses: actions/checkout@v4 + + - name: ci_post_clone + run: | + defaults write com.apple.dt.Xcode IDESkipPackagePluginFingerprintValidatation -bool YES + + - name: Set Default Scheme + run: | + scheme_list=$(xcodebuild -list -json | tr -d "\n") + default=$(echo $scheme_list | ruby -e "require 'json'; puts JSON.parse(STDIN.gets)['project']['targets'][0]") + echo $default | cat >default + echo Using default scheme: $default + + - name: Build + env: + scheme: ${{ 'default' }} + platform: ${{ 'iOS Simulator' }} + run: | + # xcrun xctrace returns via stderr, not the expected stdout (see https://developer.apple.com/forums/thread/663959) + device=`xcrun xctrace list devices 2>&1 | grep -oE 'iPhone.*?[^\(]+' | head -1 | awk '{$1=$1;print}' | sed -e "s/ Simulator$//"` + if [ $scheme = default ]; then scheme=$(cat default); fi + if [ "`ls -A | grep -i \\.xcworkspace\$`" ]; then filetype_parameter="workspace" && file_to_build="`ls -A | grep -i \\.xcworkspace\$`"; else filetype_parameter="project" && file_to_build="`ls -A | grep -i \\.xcodeproj\$`"; fi + file_to_build=`echo $file_to_build | awk '{$1=$1;print}'` + xcodebuild build-for-testing -scheme "$scheme" -"$filetype_parameter" "$file_to_build" -destination "platform=$platform,name=$device" diff --git a/.github/workflows/build-working.yml b/.github/workflows/build-working.yml new file mode 100644 index 0000000..a288300 --- /dev/null +++ b/.github/workflows/build-working.yml @@ -0,0 +1,44 @@ +name: Build + +on: + push: + branches: + - '**' + - '!main' + - '!develop' + +jobs: + build: + name: working + runs-on: macos-latest + + steps: + - uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: latest-stable + + - name: Checkout + uses: actions/checkout@v4 + + - name: ci_post_clone + run: | + defaults write com.apple.dt.Xcode IDESkipPackagePluginFingerprintValidatation -bool YES + + - name: Set Default Scheme + run: | + scheme_list=$(xcodebuild -list -json) + echo "$scheme_list" + default=$(echo $scheme_list | ruby -e "require 'json'; puts JSON.parse(STDIN.gets)['project']['targets'][0]") + echo $default | cat >default + echo Using default scheme: $default + + - name: Build + env: + scheme: ${{ 'default' }} + platform: ${{ 'iOS Simulator' }} + run: | + device=`xcrun xctrace list devices 2>&1 | grep -oE 'iPhone.*?[^\(]+' | head -1 | awk '{$1=$1;print}' | sed -e "s/ Simulator$//"` + if [ $scheme = default ]; then scheme=$(cat default); fi + if [ "`ls -A | grep -i \\.xcworkspace\$`" ]; then filetype_parameter="workspace" && file_to_build="`ls -A | grep -i \\.xcworkspace\$`"; else filetype_parameter="project" && file_to_build="`ls -A | grep -i \\.xcodeproj\$`"; fi + file_to_build=`echo $file_to_build | awk '{$1=$1;print}'` + xcodebuild build-for-testing -scheme "$scheme" -"$filetype_parameter" "$file_to_build" -destination "platform=$platform,name=$device" \ No newline at end of file diff --git a/.github/workflows/release-develop.yml b/.github/workflows/release-develop.yml new file mode 100644 index 0000000..d5a4acc --- /dev/null +++ b/.github/workflows/release-develop.yml @@ -0,0 +1,77 @@ +name: Release + +on: + push: + branches: develop + +jobs: + build: + name: develop + runs-on: macos-latest + + steps: + - uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: latest-stable + + - name: Checkout + uses: actions/checkout@v4 + + - name: ci_post_clone + run: | + defaults write com.apple.dt.Xcode IDESkipPackagePluginFingerprintValidatation -bool YES + + - name: Set Environment + run: | + if [ "`ls -A | grep -i \\.xcworkspace\$`" ]; then app_name="`ls -A | grep -i \\.xcworkspace\$`"; else app_name="`ls -A | grep -i \\.xcodeproj\$`"; fi + if [[ "$app_name" == *.xcodeproj ]]; then + project_name="${app_name%.xcodeproj}" + elif [[ "$app_name" == *.xcworkspace ]]; then + project_name="${app_name%.xcworkspace}" + fi + echo "PROJECT_NAME=$project_name" >> $GITHUB_ENV + + - name: Archive Project + run: | + if [ "`ls -A | grep -i \\.xcworkspace\$`" ]; then filetype_parameter="workspace" && file_to_build="`ls -A | grep -i \\.xcworkspace\$`"; else filetype_parameter="project" && file_to_build="`ls -A | grep -i \\.xcodeproj\$`"; fi + scheme_list=$(xcodebuild -list -json | tr -d "\n") + default=$(echo $scheme_list | ruby -e "require 'json'; puts JSON.parse(STDIN.gets)['project']['targets'][0]") + xcodebuild archive -"$filetype_parameter" "$file_to_build" \ + -scheme $default \ + -sdk iphoneos \ + -configuration Release \ + -archivePath build.xcarchive \ + CODE_SIGNING_ALLOWED=NO + + - name: Create ExportOptions.plist + run: | + echo '${{ secrets.EXPORT_OPTIONS }}' > ExportOptions.plist + + - name: Create Private Key + run: | + mkdir private_keys + echo -n '${{ secrets.APPLE_API_KEY_BASE64 }}' | base64 --decode > ./private_keys/AuthKey_${{ secrets.APPLE_API_ISSUER_ID }}.p8 + + - name: Export IPA + run: | + xcodebuild -exportArchive \ + -archivePath build.xcarchive \ + -exportOptionsPlist ExportOptions.plist \ + -exportPath app.ipa \ + -allowProvisioningUpdates \ + -authenticationKeyPath `pwd`/private_keys/AuthKey_${{ secrets.APPLE_API_ISSUER_ID }}.p8 \ + -authenticationKeyID ${{ secrets.APPLE_API_KEY_ID }} \ + -authenticationKeyIssuerID ${{ secrets.APPLE_API_ISSUER_ID }} + + - name: Upload IPA file to App Store Connect + run: | + xcrun altool --upload-app -f app.ipa/${{ env.PROJECT_NAME }}.ipa \ + -u ${{ secrets.APPLE_ID }} \ + -p ${{ secrets.APP_SPECIFIC_PASSWORD }} \ + --type ios + + - name: Upload IPA file to GitHub + uses: actions/upload-artifact@v3 + with: + name: ${{ env.PROJECT_NAME }}.ipa + path: app.ipa/${{ env.PROJECT_NAME }}.ipa \ No newline at end of file diff --git a/.github/workflows/release-main.yml b/.github/workflows/release-main.yml new file mode 100644 index 0000000..e8d6e5e --- /dev/null +++ b/.github/workflows/release-main.yml @@ -0,0 +1,77 @@ +name: Release + +on: + push: + branches: main + +jobs: + build: + name: main + runs-on: macos-latest + + steps: + - uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: latest-stable + + - name: Checkout + uses: actions/checkout@v4 + + - name: ci_post_clone + run: | + defaults write com.apple.dt.Xcode IDESkipPackagePluginFingerprintValidatation -bool YES + + - name: Set Environment + run: | + if [ "`ls -A | grep -i \\.xcworkspace\$`" ]; then app_name="`ls -A | grep -i \\.xcworkspace\$`"; else app_name="`ls -A | grep -i \\.xcodeproj\$`"; fi + if [[ "$app_name" == *.xcodeproj ]]; then + project_name="${app_name%.xcodeproj}" + elif [[ "$app_name" == *.xcworkspace ]]; then + project_name="${app_name%.xcworkspace}" + fi + echo "PROJECT_NAME=$project_name" >> $GITHUB_ENV + + - name: Archive Project + run: | + if [ "`ls -A | grep -i \\.xcworkspace\$`" ]; then filetype_parameter="workspace" && file_to_build="`ls -A | grep -i \\.xcworkspace\$`"; else filetype_parameter="project" && file_to_build="`ls -A | grep -i \\.xcodeproj\$`"; fi + scheme_list=$(xcodebuild -list -json | tr -d "\n") + default=$(echo $scheme_list | ruby -e "require 'json'; puts JSON.parse(STDIN.gets)['project']['targets'][0]") + xcodebuild archive -"$filetype_parameter" "$file_to_build" \ + -scheme $default \ + -sdk iphoneos \ + -configuration Release \ + -archivePath build.xcarchive \ + CODE_SIGNING_ALLOWED=NO + + - name: Create ExportOptions.plist + run: | + echo '${{ secrets.EXPORT_OPTIONS }}' > ExportOptions.plist + + - name: Create Private Key + run: | + mkdir private_keys + echo -n '${{ secrets.APPLE_API_KEY_BASE64 }}' | base64 --decode > ./private_keys/AuthKey_${{ secrets.APPLE_API_ISSUER_ID }}.p8 + + - name: Export IPA + run: | + xcodebuild -exportArchive \ + -archivePath build.xcarchive \ + -exportOptionsPlist ExportOptions.plist \ + -exportPath app.ipa \ + -allowProvisioningUpdates \ + -authenticationKeyPath `pwd`/private_keys/AuthKey_${{ secrets.APPLE_API_ISSUER_ID }}.p8 \ + -authenticationKeyID ${{ secrets.APPLE_API_KEY_ID }} \ + -authenticationKeyIssuerID ${{ secrets.APPLE_API_ISSUER_ID }} + + - name: Upload IPA file to App Store Connect + run: | + xcrun altool --upload-app -f app.ipa/${{ env.PROJECT_NAME }}.ipa \ + -u ${{ secrets.APPLE_ID }} \ + -p ${{ secrets.APP_SPECIFIC_PASSWORD }} \ + --type ios + + - name: Upload IPA file to GitHub + uses: actions/upload-artifact@v3 + with: + name: ${{ env.PROJECT_NAME }}.ipa + path: app.ipa/${{ env.PROJECT_NAME }}.ipa \ No newline at end of file