diff --git a/.github/workflows/build_and_deploy.yml b/.github/workflows/build_and_deploy.yml index 105139e47..a6f60e4b6 100644 --- a/.github/workflows/build_and_deploy.yml +++ b/.github/workflows/build_and_deploy.yml @@ -31,7 +31,7 @@ env: VOICEVOX_RESOURCE_VERSION: "0.15.0-preview.3" VOICEVOX_FAT_RESOURCE_VERSION: "0.15.0-preview.3" # releaseタグ名か、workflow_dispatchでのバージョン名か、'0.0.0'が入る - VERSION: ${{ github.event.release.tag_name || inputs.version || '0.0.0' }} + VERSION: ${{ github.event.release.tag_name || github.event.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' }} @@ -183,21 +183,21 @@ jobs: build_and_deploy: needs: config - environment: ${{ inputs.is_production == 'true' && 'production' || '' }} # 製品版のenvironment + environment: ${{ github.event.inputs.is_production == 'true' && 'production' || '' }} # 製品版のenvironment strategy: matrix: include: ${{ fromJson(needs.config.outputs.includes) }} runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 # 製品版ではない場合 - if: ${{ inputs.is_production != 'true' }} + if: ${{ github.event.inputs.is_production != 'true' }} - uses: actions/checkout@v3 # 製品版の場合 - if: ${{ inputs.is_production == 'true' }} + if: ${{ github.event.inputs.is_production == 'true' }} with: fetch-depth: 0 # 全履歴取得 token: ${{ secrets.PRODUCTION_GITHUB_TOKEN }} - name: Merge production branch - if: inputs.is_production == 'true' + if: github.event.inputs.is_production == 'true' shell: bash run: | ( @@ -230,14 +230,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: inputs.is_production == 'true' + if: github.event.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: inputs.is_production == 'true' + if: github.event.inputs.is_production == 'true' shell: bash run: | mv -f download/resource/core/README.md ./README.md @@ -251,14 +251,14 @@ jobs: if ${{ !!matrix.whl_local_version }}; then cargo set-version "$VERSION+"${{ matrix.whl_local_version }} -p voicevox_core_python_api; fi - name: cache target uses: Swatinem/rust-cache@v2 - if: inputs.is_production != 'true' + if: github.event.inputs.is_production != 'true' - name: build voicevox_core_c_api shell: bash run: | function build() { cargo build -p voicevox_core_c_api -vv --features ${{ matrix.features }}, --target ${{ matrix.target }} --release } - if ${{ inputs.is_production != 'true' }}; then + if ${{ github.event.inputs.is_production != 'true' }}; then build else build > /dev/null 2>&1 @@ -275,7 +275,7 @@ jobs: function build() { maturin build --manifest-path ./crates/voicevox_core_python_api/Cargo.toml --features ${{ matrix.features }}, --target ${{ matrix.target }} --release } - if ${{ inputs.is_production != 'true' }}; then + if ${{ github.event.inputs.is_production != 'true' }}; then build else build > /dev/null 2>&1 @@ -289,7 +289,7 @@ jobs: function build() { cargo build -p voicevox_core_java_api -vv --features ${{ matrix.features }}, --target ${{ matrix.target }} --release } - if ${{ inputs.is_production != 'true' }}; then + if ${{ github.event.inputs.is_production != 'true' }}; then build else build > /dev/null 2>&1 @@ -413,14 +413,14 @@ jobs: steps: - uses: actions/checkout@v3 - name: Checkout VOICEVOX FAT RESOURCE - if: inputs.is_production == 'true' + if: github.event.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: inputs.is_production == 'true' + if: github.event.inputs.is_production == 'true' shell: bash run: | rm -r ./model; mv download/fat_resource/core/model ./model