From b87afd8e910e76ed96c4863aa2cd2ba8c48e7ae4 Mon Sep 17 00:00:00 2001 From: Ryo Yamashita Date: Mon, 2 Sep 2024 23:03:23 +0900 Subject: [PATCH] =?UTF-8?q?`inputs.is=5Fproduction`=E3=82=92=E6=AE=8B?= =?UTF-8?q?=E3=81=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://github.com/VOICEVOX/voicevox_core/pull/825#discussion_r1740958377 --- .github/workflows/build_and_deploy.yml | 35 ++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_and_deploy.yml b/.github/workflows/build_and_deploy.yml index 4f55d14b5..9f0483d8b 100644 --- a/.github/workflows/build_and_deploy.yml +++ b/.github/workflows/build_and_deploy.yml @@ -16,6 +16,13 @@ on: type: boolean required: false default: false + # TODO: ライセンス表記およびモデル配布形体の方針が固まったら廃止 + # + is_production: + description: "製品版をビルドする" + type: boolean + required: false + default: false release: types: - published @@ -186,6 +193,18 @@ jobs: run: | 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 + uses: actions/checkout@v4 + with: + repository: VOICEVOX/voicevox_resource + ref: ${{ env.VOICEVOX_RESOURCE_VERSION }} + path: download/resource + - name: Raplace resource + if: inputs.is_production + shell: bash + run: + mv -f download/resource/core/README.md ./README.md - name: Install cargo-binstall uses: taiki-e/install-action@cargo-binstall - name: Install cargo-edit @@ -322,13 +341,25 @@ jobs: ${{ env.ASSET_NAME }}.zip target_commitish: ${{ github.sha }} - deploy_sample_model: + deploy_model: runs-on: ubuntu-latest needs: config env: - ASSET_NAME: sample-model-${{ needs.config.outputs.version }} + ASSET_NAME: model-${{ needs.config.outputs.version }} steps: - uses: actions/checkout@v4 + - name: Checkout VOICEVOX FAT RESOURCE + if: inputs.is_production + uses: actions/checkout@v4 + with: + repository: VOICEVOX/voicevox_fat_resource + ref: ${{ env.VOICEVOX_FAT_RESOURCE_VERSION }} + path: download/fat_resource + - name: Raplace resource + if: inputs.is_production + shell: bash + run: + rm -r ./model; mv download/fat_resource/core/model ./model - name: Create artifact run: | mkdir "artifact"