Skip to content

Commit

Permalink
github.event.inputs→inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiroshiba committed Sep 12, 2023
1 parent 5ee41c4 commit 4548853
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/build_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ env:
VOICEVOX_RESOURCE_VERSION: "0.15.0-preview.1"
VOICEVOX_FAT_RESOURCE_VERSION: "0.15.0-preview.2"
# releaseタグ名か、workflow_dispatchでのバージョン名か、'0.0.0'が入る
VERSION: ${{ github.event.release.tag_name || github.event.inputs.version || '0.0.0' }}
VERSION: ${{ github.event.release.tag_name || inputs.version || '0.0.0' }}
PRODUCTION_REPOSITORY_TAG: "0.15.0-preview.3" # 製品版のタグ名
# 簡易テストとするかどうか。releaseとworkflow_dispatch以外は簡易テストとする
IS_SIMPLE_TEST: ${{ github.event_name != 'release' && github.event_name != 'workflow_dispatch' }}
Expand Down Expand Up @@ -182,21 +182,21 @@ jobs:
build_and_deploy:
needs: build_and_deploy_strategy_matrix
environment: ${{ github.event.inputs.is_production == 'true' && 'production' || '' }} # 製品版のenvironment
environment: ${{ inputs.is_production == 'true' && 'production' || '' }} # 製品版のenvironment
strategy:
matrix:
include: ${{ fromJson(needs.build_and_deploy_strategy_matrix.outputs.includes) }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3 # 製品版ではない場合
if: ${{ github.event.inputs.is_production != 'true' }}
if: ${{ inputs.is_production != 'true' }}
- uses: actions/checkout@v3 # 製品版の場合
if: ${{ github.event.inputs.is_production == 'true' }}
if: ${{ inputs.is_production == 'true' }}
with:
fetch-depth: 0 # 全履歴取得
token: ${{ secrets.PRODUCTION_GITHUB_TOKEN }}
- name: Merge production branch
if: github.event.inputs.is_production == 'true'
if: inputs.is_production == 'true'
shell: bash
run: |
(
Expand Down Expand Up @@ -229,14 +229,14 @@ jobs:
echo "$ANDROID_NDK/toolchains/llvm/prebuilt/linux-x86_64/bin" >> "$GITHUB_PATH"
echo "AR_${{ matrix.target }}=llvm-ar" >> "$GITHUB_ENV"
- name: Checkout VOICEVOX RESOURCE
if: github.event.inputs.is_production == 'true'
if: inputs.is_production == 'true'
uses: actions/checkout@v3
with:
repository: VOICEVOX/voicevox_resource
ref: ${{ env.VOICEVOX_RESOURCE_VERSION }}
path: download/resource
- name: Raplace resource
if: github.event.inputs.is_production == 'true'
if: inputs.is_production == 'true'
shell: bash
run: |
mv -f download/resource/core/README.md ./README.md
Expand All @@ -254,7 +254,7 @@ jobs:
function build() {
cargo build -p voicevox_core_c_api -vv --features ${{ matrix.features }}, --target ${{ matrix.target }} --release
}
if ${{ github.event.inputs.is_production != 'true' }}; then
if ${{ inputs.is_production != 'true' }}; then
build
else
build > /dev/null 2>&1
Expand All @@ -270,7 +270,7 @@ jobs:
function build() {
maturin build --manifest-path ./crates/voicevox_core_python_api/Cargo.toml --features ${{ matrix.features }}, --target ${{ matrix.target }} --release
}
if ${{ github.event.inputs.is_production != 'true' }}; then
if ${{ inputs.is_production != 'true' }}; then
build
else
build > /dev/null 2>&1
Expand All @@ -293,7 +293,7 @@ jobs:
cp -vr model "artifact/${{ env.ASSET_NAME }}/"
echo "${{ env.VERSION }}" > "artifact/${{ env.ASSET_NAME }}/VERSION"
- name: Code signing (Windows)
if: startsWith(matrix.os, 'windows') && github.event.inputs.code_signing == 'true'
if: startsWith(matrix.os, 'windows') && inputs.code_signing == 'true'
run: |
bash build_util/codesign.bash "artifact/${{ env.ASSET_NAME }}/voicevox_core.dll"
env:
Expand Down Expand Up @@ -387,14 +387,14 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Checkout VOICEVOX FAT RESOURCE
if: github.event.inputs.is_production == 'true'
if: inputs.is_production == 'true'
uses: actions/checkout@v3
with:
repository: VOICEVOX/voicevox_fat_resource
ref: ${{ env.VOICEVOX_FAT_RESOURCE_VERSION }}
path: download/fat_resource
- name: Raplace resource
if: github.event.inputs.is_production == 'true'
if: inputs.is_production == 'true'
shell: bash
run: |
rm -r ./model; mv download/fat_resource/core/model ./model
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build_and_deploy_downloader.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ on:

env:
# releaseタグ名か、workflow_dispatchでのバージョン名か、'0.0.0'が入る
VERSION: ${{ github.event.release.tag_name || github.event.inputs.version || '0.0.0' }}
VERSION: ${{ github.event.release.tag_name || inputs.version || '0.0.0' }}

defaults:
run:
shell: bash

jobs:
deploy_and_deploy_downloader:
environment: ${{ github.event.inputs.is_production == 'true' && 'production' || '' }} # コード署名用のenvironment
environment: ${{ inputs.is_production == 'true' && 'production' || '' }} # コード署名用のenvironment
strategy:
matrix:
include:
Expand Down Expand Up @@ -94,7 +94,7 @@ jobs:
mv $"target/${{ matrix.target }}/release/download$exe_suffix" ./${{ matrix.name }}
- name: Code signing (Windows)
if: startsWith(matrix.os, 'windows') && github.event.inputs.code_signing == 'true'
if: startsWith(matrix.os, 'windows') && inputs.code_signing == 'true'
run: |
bash build_util/codesign.bash ./${{ matrix.name }}
env:
Expand Down

0 comments on commit 4548853

Please sign in to comment.