Skip to content

Commit

Permalink
github.event.
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiroshiba committed Oct 10, 2023
1 parent 2e93f10 commit e5f5ade
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 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.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' }}
Expand Down Expand Up @@ -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: |
(
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e5f5ade

Please sign in to comment.