Skip to content
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

zipファイルをreleaseにアップロードする #656

Merged
merged 4 commits into from
Jan 23, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 14 additions & 41 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -273,30 +273,34 @@ jobs:
voicevox_engine_asset_name: linux-nvidia
linux_executable_name: voicevox
targz_name: VOICEVOX
zip_name: voicevox-linux-nvidia
app_asar_dir: prepackage/resources
# Linux CPU
- artifact_name: linux-cpu-prepackage
noengine_artifact_name: linux-noengine-cpu-prepackage
voicevox_engine_asset_name: linux-cpu
linux_executable_name: voicevox
targz_name: VOICEVOX-CPU
zip_name: voicevox-linux-cpu
app_asar_dir: prepackage/resources
# Windows NVIDIA GPU
- artifact_name: windows-nvidia-prepackage
noengine_artifact_name: windows-noengine-prepackage
voicevox_engine_asset_name: windows-nvidia
zip_name: voicevox-windows-nvidia
app_asar_dir: prepackage/resources
# Windows CPU
- artifact_name: windows-cpu-prepackage
noengine_artifact_name: windows-noengine-cpu-prepackage
voicevox_engine_asset_name: windows-cpu
zip_name: voicevox-windows-cpu
app_asar_dir: prepackage/resources
# macOS CPU
- artifact_name: macos-cpu-prepackage
noengine_artifact_name: macos-noengine-cpu-prepackage
voicevox_engine_asset_name: macos-x64
macos_executable_name: VOICEVOX
zip_name: voicevox-cpu-macos-x64
zip_name: voicevox-macos-cpu
app_asar_dir: prepackage/VOICEVOX.app/Contents/Resources

runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -455,48 +459,13 @@ jobs:
run: |
echo "BUILD_IDENTIFIER=${GITHUB_REF##*/}" >> $GITHUB_ENV

# Create tar.gz for Linux
#
# Due to GitHub Actions limitation (https://github.com/actions/upload-artifact/issues/38),
# file permissions are lost in actions/upload-artifact.
# To distribute binaries (voicevox, run) with execute permission,
# we need to pack all the files in tarball (tar.gz) before uploading.
# https://github.com/actions/upload-artifact/blob/11e311c8b504ea40cbed20583a64d75b4735cff3/README.md#maintaining-file-permissions-and-case-sensitive-files
#
# voicevox-x.x.x.tar.gz
# - VOICEVOX/
# - voicevox
# - run
#
- name: Create Linux tar.gz
if: startsWith(matrix.artifact_name, 'linux-') # linux
shell: bash
run: |
mv prepackage VOICEVOX
tar cf "${{ matrix.targz_name }}-${{ env.BUILD_IDENTIFIER }}.tar.gz" VOICEVOX/

- name: Show disk space (debug info)
if: startsWith(matrix.artifact_name, 'linux-') # linux
shell: bash
run: |
df -h

- name: Upload Linux tar.gz artifact
if: startsWith(matrix.artifact_name, 'linux-') # linux
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.artifact_name }}-targz
path: "${{ matrix.targz_name }}-${{ env.BUILD_IDENTIFIER }}.tar.gz"

- name: Create macOS zip
if: startsWith(matrix.artifact_name, 'macos-')
- name: Create zip
shell: bash
run: |
mv prepackage VOICEVOX
zip "${{ matrix.zip_name }}.zip" -r VOICEVOX

- name: Upload macOS zip artifact
if: startsWith(matrix.artifact_name, 'macos-')
- name: Upload zip artifact
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.artifact_name }}-zip
Expand Down Expand Up @@ -751,8 +720,12 @@ jobs:
appimage_7z_name: VOICEVOX.AppImage
- artifact_name: linux-cpu-appimage
appimage_7z_name: VOICEVOX-CPU.AppImage
- artifact_name: linux-nvidia-prepackage-zip
- artifact_name: linux-cpu-prepackage-zip
- artifact_name: windows-nvidia-nsis-web
- artifact_name: windows-cpu-nsis-web
- artifact_name: windows-nvidia-prepackage-zip
- artifact_name: windows-cpu-prepackage-zip
- artifact_name: macos-cpu-dmg
- artifact_name: macos-cpu-prepackage-zip

Expand Down Expand Up @@ -853,9 +826,9 @@ jobs:
file_glob: true
file: artifact/*.dmg

# macOS zip
- name: Upload macOS zip to Release assets
if: startsWith(matrix.artifact_name, 'macos-') && endsWith(matrix.artifact_name, '-zip')
# zip
- name: Upload zip to Release assets
if: endsWith(matrix.artifact_name, '-zip')
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down