Skip to content

Commit

Permalink
Merge pull request #16 from nanasess/auto-generate-release-note
Browse files Browse the repository at this point in the history
Auto generate release note
  • Loading branch information
nanasess authored Nov 11, 2021
2 parents 0d0f7a2 + 4193f7b commit 2beccf2
Show file tree
Hide file tree
Showing 46 changed files with 1,800 additions and 2,146 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,12 @@ jobs:
- name: Install to Composer
run: |
composer install --no-interaction -o
composer remove php5friends/codeception-phpunit48-wrapper --ignore-platform-reqs --dev
composer require php5friends/codeception-phpunit48-wrapper ">=6.0.20" --dev
composer require captbaritone/mailcatcher-codeception-module "1.2.1" --dev
composer require codeception/codeception "*" --dev
composer remove php5friends/codeception-phpunit48-wrapper --dev
composer remove php5friends/phpunit48 --ignore-platform-reqs --dev
- name: Create ADMIN_DIR
run: |
sudo apt-fast install -y sharutils
Expand Down
37 changes: 34 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,21 @@ on:
schedule:
# 水曜日の 00:00 (JST) に処理を実行する
# UTC の 15:00 は JST だと翌日の 00:00
- cron: '0 15 * * 2'
# - cron: '0 15 * * 2'
- cron: '*/5 * * * *'
release:
types: [ published ]
jobs:
deploy:
name: Deploy
runs-on: ubuntu-18.04
steps:
- name: PREVIOUS_TAG_NAME
run: echo "PREVIOUS_TAG_NAME=$(curl -H 'Accept: application/vnd.github.v3+json' https://api.github.com/repos/${{ github.repository }}/releases/latest | jq -r .tag_name)" >> $GITHUB_ENV

- name: TAG_NAME for schedule
if: github.event_name == 'schedule'
run: echo "TAG_NAME=eccube2-weekly-$(date +%Y%m%d)" >> $GITHUB_ENV
run: echo "TAG_NAME=eccube2-weekly-$(date +%Y%m%d%H%M%S)" >> $GITHUB_ENV
- name: TAG_NAME for release
if: github.event_name == 'release'
env:
Expand All @@ -40,8 +44,25 @@ jobs:
</tbody>
</table>
draft: false
draft: true
prerelease: true
- name: RELEASE_BODY
if: github.event_name == 'schedule'
env:
TAG_NAME: ${{ env.TAG_NAME }}
run: echo "RELEASE_BODY=$(curl -H 'Accept: application/vnd.github.v3+json' https://api.github.com/repos/${{ github.repository }}/releases/tags/${TAG_NAME} | jq -r .body)" >> $GITHUB_ENV
- name: RELEASE_ID
if: github.event_name == 'schedule'
env:
TAG_NAME: ${{ env.TAG_NAME }}
run: echo "RELEASE_ID=$(curl -H 'Accept: application/vnd.github.v3+json' https://api.github.com/repos/${{ github.repository }}/releases/tags/${TAG_NAME} | jq -r .id)" >> $GITHUB_ENV
- name: GENERATED_NOTES
if: github.event_name == 'schedule'
env:
TAG_NAME: ${{ env.TAG_NAME }}
PREVIOUS_TAG_NAME: ${{ env.PREVIOUS_TAG_NAME }}
run: echo "GENERATED_NOTES=$(curl -X POST -H 'Accept: application/vnd.github.v3+json' -H 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' https://api.github.com/repos/${{ github.repository }}/releases/generate-notes -d '{"tag_name":"'${TAG_NAME}'", "previous_tag_name":"'${PREVIOUS_TAG_NAME}'"}' | jq -r .body)" >> $GITHUB_ENV

- name: Checkout code
if: github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'prereleased' )
uses: actions/checkout@v2
Expand Down Expand Up @@ -208,3 +229,13 @@ jobs:
asset_name: ${{ env.TAG_NAME }}.zip.checksum.sha256
tag: ${{ env.TAG_NAME }}
overwrite: true

- name: Update Release notes
if: github.event_name == 'schedule'
run: |
curl \
-X PATCH \
-H "Accept: application/vnd.github.v3+json" \
-H "authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
https://api.github.com/repos/${{ github.repository }}/releases/${{ env.RELEASE_ID }} \
-d '{"draft":true, "body":"${{ env.RELEASE_BODY }}\n${{ env.GENERATED_NOTES }}"}'
33 changes: 22 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@ jobs:
restore-keys: |
${{ runner.os }}-composer-
- name: Install to Composer
run: |
composer install --no-interaction -o
composer require php5friends/codeception-phpunit48-wrapper ">=6.0.20" --dev
composer require captbaritone/mailcatcher-codeception-module "1.2.1" --dev
composer require codeception/codeception "*" --dev
- name: Setup PHP
uses: nanasess/setup-php@master
with:
Expand All @@ -96,8 +103,6 @@ jobs:
symfony local:php:list
symfony server:ca:install
- name: Install to Composer
run: composer install --no-interaction -o
- name: Create ADMIN_DIR
run: |
sudo apt-fast install -y sharutils
Expand Down Expand Up @@ -176,11 +181,6 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP
uses: nanasess/setup-php@master
with:
php-version: ${{ matrix.php }}

- name: Get Composer Cache Directory
id: composer-cache
run: |
Expand All @@ -192,6 +192,9 @@ jobs:
restore-keys: |
${{ runner.os }}-composer-
- run: echo "extension=gd" >> C:/tools/php/php.ini
shell: bash

- name: Install to Composer
run: composer install --no-interaction -o

Expand All @@ -208,6 +211,11 @@ jobs:
mysql --user=root -e "CREATE DATABASE eccube_db DEFAULT COLLATE=utf8_general_ci;"
mysql --user=root -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION;FLUSH PRIVILEGES;"
- name: Setup PHP
uses: nanasess/setup-php@master
with:
php-version: ${{ matrix.php }}

- name: Setup to EC-CUBE
env:
DB: mysql
Expand Down Expand Up @@ -296,6 +304,13 @@ jobs:
restore-keys: |
${{ runner.os }}-composer-
- name: Install to Composer
run: |
composer install --no-interaction -o
composer require php5friends/codeception-phpunit48-wrapper ">=6.0.20" --dev
composer require captbaritone/mailcatcher-codeception-module "1.2.1" --dev
composer require codeception/codeception "*" --dev
- name: Setup PHP
uses: nanasess/setup-php@master
with:
Expand All @@ -319,10 +334,6 @@ jobs:
symfony local:php:list
symfony server:ca:install
- name: Install to Composer
run: composer install --no-interaction -o

- name: setup-chromedriver
uses: nanasess/setup-chromedriver@master

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ EC-CUBEのインストールは、以下の方法があります。

### パッケージを使用してインストールする

[EC-CUBE のパッケージ](https://github.com/EC-CUBE/ec-cube2/releases)をダウンロードし、解凍してください。
[EC-CUBE のパッケージ](https://github.com/EC-CUBE/ec-cube2/releases/latest)をダウンロードし、解凍してください。

FTP/SSHを使用し、ファイルをサーバへアップロードしてください。
※ファイル数が多いためエラーが発生することがございます。エラー発生時は分割してアップロードをお願いします。
Expand Down Expand Up @@ -91,8 +91,8 @@ php composer.phar install --no-dev --no-interaction -o

- *開発環境におすすめです。*

それぞれのコマンドの実行完了してから http://localhost:8080/ へアクセスすると、EC-CUBEのフロント画面が表示されます。
管理画面は http://localhost:8080/admin/ へアクセスしてください。
それぞれのコマンドの実行完了してから https://localhost:4430/ へアクセスすると、EC-CUBEのフロント画面が表示されます。
管理画面は https://localhost:4430/admin/ へアクセスしてください。

#### PostgreSQL を使用する場合

Expand Down
6 changes: 2 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,16 @@
}
},
"require-dev": {
"captbaritone/mailcatcher-codeception-module": "1.2.1",
"codeception/codeception": "*",
"fzaninotto/faker": "^1.8",
"php5friends/codeception-phpunit48-wrapper": ">=6.0.20",
"guzzlehttp/guzzle": "^5.3",
"php5friends/phpunit48": ">=4.8.41"
},
"require": {
"php": ">=5.4.16",
"ext-gd": "*",
"ext-mbstring": "*",
"bondas83/mdb2_driver_mysqli": "^1.5",
"mobiledetect/mobiledetectlib": "^2.8",
"nanasess/mdb2_driver_mysqli": "^1.5",
"nanasess/mdb2_driver_pgsql": "^1.5",
"nanasess/php8-compat": "^1.0",
"pear/archive_tar": "^1.4.3",
Expand Down
Loading

0 comments on commit 2beccf2

Please sign in to comment.