Skip to content
This repository has been archived by the owner on Dec 21, 2024. It is now read-only.

Commit

Permalink
Merge pull request #17 from tshion/develop
Browse files Browse the repository at this point in the history
Merge 1.0
  • Loading branch information
tshion authored Feb 24, 2024
2 parents 121f618 + 9bd3761 commit e49fc7b
Show file tree
Hide file tree
Showing 20 changed files with 689 additions and 60 deletions.
20 changes: 20 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# http://editorconfig.org
root = true

[*]
charset = utf-8
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.json]
insert_final_newline = false

[*.md]
max_line_length = off
insert_final_newline = false
trim_trailing_whitespace = false

[*.{yaml,yml}]
indent_size = 2
19 changes: 19 additions & 0 deletions .github/issue_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
## 概要



## 作業内容
### 完了条件
* TODO

### 想定される範囲
* TODO

### 対応しないこと
* TODO



## 備考
### 参考文献
* TODO
27 changes: 27 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
* [ ] 新規追加
* [ ] 既存改良
* [ ] 不具合修正

## 概要



## 変更点
### 追加
* TODO

### 削除
* TODO

### 修正
* TODO



## 確認事項
* [ ] TODO



## 備考
* TODO
37 changes: 37 additions & 0 deletions .github/workflows/create-merge-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Create merge pull request

on:
pull_request:
types:
- closed
branches-ignore:
- 'released'
paths:
- 'Build.xcconfig'
workflow_dispatch:

jobs:
create-merge-pr:
if: >-
github.event_name == 'workflow_dispatch' ||
(github.event.pull_request.merged == true && startsWith(github.event.pull_request.title, 'アプリバージョン更新'))
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
# https://github.com/actions/checkout
- uses: actions/checkout@v4

# https://github.com/ruby/setup-ruby
- uses: ruby/setup-ruby@v1

- name: Pick version name
id: app-version
run: |
echo "$(ruby scripts/pick-version-name.rb)" > TMP_LOG
echo "message=Merge $(cat TMP_LOG)" >> "$GITHUB_OUTPUT"
- name: Create pull request
run: gh pr create --base released --title "${{ steps.app-version.outputs.message }}" --body ""
env:
GITHUB_TOKEN: ${{ github.token }}
36 changes: 36 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Create release

on:
push:
branches:
- released
workflow_dispatch:

jobs:
create-release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
# https://github.com/actions/checkout
- uses: actions/checkout@v4

# https://github.com/ruby/setup-ruby
- uses: ruby/setup-ruby@v1

- name: Pick version name
id: app-version
run: |
echo "$(ruby scripts/pick-version-name.rb)" > TMP_LOG
echo "version-name=$(cat TMP_LOG)" >> "$GITHUB_OUTPUT"
- name: Set git tag
run: |
echo "${{ steps.app-version.outputs.version-name }}" > TAG_NAME
git tag "$(cat TAG_NAME)"
git push origin "$(cat TAG_NAME)"
- name: Create release
run: gh release create "${{ steps.app-version.outputs.version-name }}" --generate-notes --title "${{ steps.app-version.outputs.version-name }}"
env:
GITHUB_TOKEN: ${{ github.token }}
55 changes: 55 additions & 0 deletions .github/workflows/update-app-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Update app version

on:
workflow_dispatch:
inputs:
versionMajor:
description: 'バージョン情報: major'
required: true
type: string
versionMinor:
description: 'バージョン情報: minor'
required: true
type: string
versionPatch:
description: 'バージョン情報: patch'
required: true
type: string

jobs:
update-app-version:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
# https://github.com/actions/checkout
- uses: actions/checkout@v4

# https://github.com/ruby/setup-ruby
- uses: ruby/setup-ruby@v1

- name: Update app version
id: app-version
run: |
ruby scripts/set-version.rb ${{ inputs.versionMajor }} ${{ inputs.versionMinor }} ${{ inputs.versionPatch }}
echo "$(ruby scripts/pick-version-name.rb)" > TMP_LOG
echo "branch-name=feature/update_$(cat TMP_LOG)" >> "$GITHUB_OUTPUT"
echo "message=アプリバージョン更新: $(cat TMP_LOG)" >> "$GITHUB_OUTPUT"
- name: Setup git settings
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "GitHub Actions"
- name: Git push
run: |
git switch -c ${{ steps.app-version.outputs.branch-name }}
git add Build.xcconfig
git commit -m "${{ steps.app-version.outputs.message }}"
git push --set-upstream origin ${{ steps.app-version.outputs.branch-name }}
- name: Create pull request
run: gh pr create --title "${{ steps.app-version.outputs.message }}" --body ""
env:
GITHUB_TOKEN: ${{ github.token }}
113 changes: 92 additions & 21 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@

# Created by https://www.toptal.com/developers/gitignore/api/macos,swift,xcode
# Edit at https://www.toptal.com/developers/gitignore?templates=macos,swift,xcode

#############
### macOS ###
#############
# General
.DS_Store
.AppleDouble
Expand Down Expand Up @@ -31,7 +29,73 @@ Network Trash Folder
Temporary Items
.apdisk



############
### Ruby ###
############
*.gem
*.rbc
/.config
/coverage/
/InstalledFiles
/pkg/
/spec/reports/
/spec/examples.txt
/test/tmp/
/test/version_tmp/
/tmp/

# Used by dotenv library to load environment variables.
# .env

# Ignore Byebug command history file.
.byebug_history

## Specific to RubyMotion:
.dat*
.repl_history
build/
*.bridgesupport
build-iPhoneOS/
build-iPhoneSimulator/

## Specific to RubyMotion (use of CocoaPods):
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#
# vendor/Pods/

## Documentation cache and generated files:
/.yardoc/
/_yardoc/
/doc/
/rdoc/

## Environment normalization:
/.bundle/
/vendor/bundle
/lib/bundler/man/

# for a library or gem, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# Gemfile.lock
# .ruby-version
# .ruby-gemset

# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
.rvmrc

# Used by RuboCop. Remote config files pulled in from inherit_from directive.
# .rubocop-https?--*



#############
### Swift ###
#############
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
Expand Down Expand Up @@ -69,36 +133,43 @@ timeline.xctimeline
playground.xcworkspace

# Swift Package Manager
#
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
# Packages/
# Package.pins
# Package.resolved
# *.xcodeproj
#
# Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata
# hence it is not needed unless you have added a package configuration file to your project
# .swiftpm

.build/

# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#
# Pods/
#
# Add this line if you want to avoid checking in source code from the Xcode workspace
# *.xcworkspace

# Carthage
#
# Add this line if you want to avoid checking in source code from Carthage dependencies.
# Carthage/Checkouts

Carthage/Build/

# Add this lines if you are using Accio dependency management (Deprecated since Xcode 12)
# Dependencies/
# .accio/
# Accio dependency management
Dependencies/
.accio/

# fastlane
#
# It is recommended to not store the screenshots in the git repo.
# Instead, use fastlane to re-generate the screenshots whenever they are needed.
# For more information about the recommended setup visit:
Expand All @@ -110,26 +181,26 @@ fastlane/screenshots/**/*.png
fastlane/test_output

# Code Injection
#
# After new code Injection tools there's a generated folder /iOSInjectionProject
# https://github.com/johnno1962/injectionforxcode

iOSInjectionProject/

### Xcode ###
# Xcode
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore




## Gcc Patch
/*.gcno
##########################
### Visual Studio Code ###
##########################
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/*.code-snippets

### Xcode Patch ###
*.xcodeproj/*
!*.xcodeproj/project.pbxproj
!*.xcodeproj/xcshareddata/
!*.xcworkspace/contents.xcworkspacedata
**/xcshareddata/WorkspaceSettings.xcsettings
# Local History for Visual Studio Code
.history/

# End of https://www.toptal.com/developers/gitignore/api/macos,swift,xcode
# Built Visual Studio Code Extensions
*.vsix
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.3.0
10 changes: 10 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"recommendations": [
"editorconfig.editorconfig",
"github.vscode-github-actions",
"github.vscode-pull-request-github",
"jebbs.plantuml",
"redhat.vscode-yaml",
"shopify.ruby-lsp",
]
}
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"githubPullRequests.ignoredPullRequestBranches": [
"develop"
],
"rubyLsp.rubyVersionManager": "rbenv",
}
Loading

0 comments on commit e49fc7b

Please sign in to comment.