-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
download_testをデフォルトでprerelease込みのlatestが使われるように変更 #608
The head ref may contain hidden characters: "download_test\u304C\u30C7\u30D5\u30A9\u30EB\u30C8\u3067prerelease\u8FBC\u307F\u306Elatest\u3092\u53C2\u7167\u3059\u308B\u3088\u3046\u306B\u5909\u66F4"
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,9 +8,14 @@ on: | |
- "Cargo.*" | ||
- "crates/download/**" | ||
- ".github/workflows/download_test.yml" | ||
|
||
env: | ||
VERSION: "prerelease-latest" | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
download-releases: | ||
strategy: | ||
|
@@ -169,29 +174,28 @@ jobs: | |
open_jtalk_dic_utf_8-1.11 | ||
runs-on: ${{ matrix.os }} | ||
name: ${{ matrix.name }}-${{ matrix.os }} | ||
env: | ||
EXPECTED_VOICEVOX_CORE_VERSION: latest | ||
# See https://github.com/VOICEVOX/voicevox_core/issues/310 | ||
#EXPECTED_VOICEVOX_CORE_VERSION: ${{ matrix.expected_version || 'latest' }} | ||
Comment on lines
-172
to
-175
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 元々はダウンロードされたバージョンのチェックとして使われていたのを、バージョン指定できるようにしたので、 |
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Rust | ||
if: ${{ startsWith(matrix.download_command, 'cargo ') }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 前のプルリクエストで必ず |
||
uses: ./.github/actions/rust-toolchain-from-file | ||
- name: Get prerelease latest version | ||
if: ${{ env.VERSION == 'prerelease-latest' }} | ||
Comment on lines
+181
to
+182
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 正確にはプレリリースの最新ではなく、プレリリースを含む最新なので、ちょっと名称が紛らわしいかも |
||
run: | | ||
VERSION=$( | ||
curl -s https://api.github.com/repos/VOICEVOX/voicevox_core/releases \ | ||
Hiroshiba marked this conversation as resolved.
Show resolved
Hide resolved
|
||
-H 'authorization: Bearer ${{ github.token }}' \ | ||
-H 'content-type: application/json' | | ||
jq -er '.[0].tag_name' | ||
) | ||
echo "VERSION=$VERSION" >> "$GITHUB_ENV" | ||
- name: Execute download command | ||
run: ${{ matrix.download_command }} | ||
run: ${{ matrix.download_command }} --version ${{ env.VERSION }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Get latest version | ||
if: ${{ env.EXPECTED_VOICEVOX_CORE_VERSION == 'latest' }} | ||
run: | | ||
echo "EXPECTED_VOICEVOX_CORE_VERSION=$(gh release view --repo VOICEVOX/voicevox_core --json 'tagName' --jq '.tagName')" >> "$GITHUB_ENV" | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
- name: Check downloaded version | ||
run: | | ||
[ -e "${{ matrix.download_dir }}/VERSION" ] | ||
[ "$(cat "${{ matrix.download_dir }}/VERSION")" = "${{ env.EXPECTED_VOICEVOX_CORE_VERSION }}" ] | ||
[ "$(cat "${{ matrix.download_dir }}/VERSION")" = "${{ env.VERSION }}" ] | ||
- name: Check downloaded files | ||
run: | | ||
mapfile -t items < <(echo -n '${{ matrix.check_items }}') | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
後々このバージョンを引数で指定可能にしたいので、workflowのenvとしてここに配置しています。