diff --git a/.github/actions/upload-release-and-artifact/action.yml b/.github/actions/upload-release-and-artifact/action.yml deleted file mode 100644 index 3ac1db26c7..0000000000 --- a/.github/actions/upload-release-and-artifact/action.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: "Upload Release Aassets and Artifacts" -description: | - releaseのassetとartifactにアップロードする。 - release・artifactにアップロードするかはそれぞれ制御できる。 - -inputs: - files: - description: "アップロードするファイルのパス。ワイルドカードも使える。複数指定する場合は改行で区切る。" - type: string - required: true - upload_release: - description: "releaseにアップロードするか。" - type: boolean - default: false - upload_artifact: - description: "artifactにアップロードするか。" - type: boolean - default: false - prerelease: - description: "pre-releaseかどうか。" - type: boolean - default: true - tag_name: - description: "タグ名。" - type: string - target_commitish: - description: "タグを付けるコミットID。" - type: string - artifact_name: - description: "artifact名。" - type: string - -runs: - using: "composite" - steps: - - name: Upload to Artifacts - if: ${{ inputs.upload_artifact }} - uses: actions/upload-artifact@v3 - with: - name: ${{ inputs.artifact_name }} - path: ${{ inputs.files }} - - - name: Upload to Release Assets - if: ${{ inputs.upload_release }} - uses: softprops/action-gh-release@v1 - with: - prerelease: ${{ inputs.prerelease }} - tag_name: ${{ inputs.tag_name }} - files: ${{ inputs.files }} - target_commitish: ${{ inputs.target_commitish }} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ef1c0f65ba..7f13381a1a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,8 +29,8 @@ env: VOICEVOX_ENGINE_VERSION: 0.14.3 VOICEVOX_RESOURCE_VERSION: 0.14.1 VOICEVOX_EDITOR_VERSION: - |- # releaseタグ名か、workflow_dispatchでのバージョン名か、999.999.999が入る - ${{ github.event.release.tag_name || github.event.inputs.version || '999.999.999' }} + |- # releaseタグ名か、workflow_dispatchでのバージョン名か、999.999.999-developが入る + ${{ github.event.release.tag_name || github.event.inputs.version || '999.999.999-develop' }} jobs: build-and-upload: @@ -375,18 +375,23 @@ jobs: 7z a -tgzip $name.tar.gz $name.tar rm $name.tar - - name: Upload Linux tar.gz (without nvidia) - if: startsWith(matrix.artifact_name, 'linux-') && !contains(matrix.artifact_name, 'nvidia') - uses: ./.github/actions/upload-release-and-artifact + - name: Upload Linux tar.gz (without nvidia) to Artifacts + if: startsWith(matrix.artifact_name, 'linux-') && !contains(matrix.artifact_name, 'nvidia') && github.event.inputs.upload_artifact + uses: actions/upload-artifact@v3 with: - files: |- + name: ${{ matrix.artifact_name }}-targz + path: |- ${{ matrix.compressed_artifact_name }}-${{ env.VOICEVOX_EDITOR_VERSION }}.tar.gz - upload_release: ${{ (github.event.release.tag_name || github.event.inputs.version) != '' }} - upload_artifact: ${{ github.event.inputs.upload_artifact }} + + - name: Upload Linux tar.gz (without nvidia) to Release Assets + if: startsWith(matrix.artifact_name, 'linux-') && !contains(matrix.artifact_name, 'nvidia') && (github.event.release.tag_name || github.event.inputs.version) != '' + uses: softprops/action-gh-release@v1 + with: prerelease: ${{ github.event.inputs.prerelease }} tag_name: ${{ env.VOICEVOX_EDITOR_VERSION }} + files: |- + ${{ matrix.compressed_artifact_name }}-${{ env.VOICEVOX_EDITOR_VERSION }}.tar.gz target_commitish: ${{ github.sha }} - artifact_name: ${{ matrix.artifact_name }}-targz - name: Delete Linux tar.gz (without nvidia) if: startsWith(matrix.artifact_name, 'linux-') && !contains(matrix.artifact_name, 'nvidia') @@ -402,18 +407,23 @@ jobs: 7z a -tzip $name.zip prepackage/ 7z rn $name.zip prepackage/ VOICEVOX/ - - name: Upload Windows & Mac zip (without nvidia) - if: (startsWith(matrix.artifact_name, 'windows-') || startsWith(matrix.artifact_name, 'macos-')) && !contains(matrix.artifact_name, 'nvidia') - uses: ./.github/actions/upload-release-and-artifact + - name: Upload Windows & Mac zip (without nvidia) to Artifacts + if: (startsWith(matrix.artifact_name, 'windows-') || startsWith(matrix.artifact_name, 'macos-')) && !contains(matrix.artifact_name, 'nvidia') && github.event.inputs.upload_artifact + uses: actions/upload-artifact@v3 with: - files: |- + name: ${{ matrix.artifact_name }}-zip + path: |- ${{ matrix.compressed_artifact_name }}-${{ env.VOICEVOX_EDITOR_VERSION }}.zip - upload_release: ${{ (github.event.release.tag_name || github.event.inputs.version) != '' }} - upload_artifact: ${{ github.event.inputs.upload_artifact }} + + - name: Upload Windows & Mac zip (without nvidia) to Release Assets + if: (startsWith(matrix.artifact_name, 'windows-') || startsWith(matrix.artifact_name, 'macos-')) && !contains(matrix.artifact_name, 'nvidia') && (github.event.release.tag_name || github.event.inputs.version) != '' + uses: softprops/action-gh-release@v1 + with: prerelease: ${{ github.event.inputs.prerelease }} tag_name: ${{ env.VOICEVOX_EDITOR_VERSION }} + files: |- + ${{ matrix.compressed_artifact_name }}-${{ env.VOICEVOX_EDITOR_VERSION }}.zip target_commitish: ${{ github.sha }} - artifact_name: ${{ matrix.artifact_name }}-zip - name: Delete Windows & Mac zip (without nvidia) if: (startsWith(matrix.artifact_name, 'windows-') || startsWith(matrix.artifact_name, 'macos-')) && !contains(matrix.artifact_name, 'nvidia') @@ -492,31 +502,41 @@ jobs: mv archives.txt "${{ matrix.installer_artifact_name }}.7z.txt" done - - name: Upload Linux AppImage split - if: endsWith(matrix.installer_artifact_name, '-appimage') - uses: ./.github/actions/upload-release-and-artifact + - name: Upload Linux AppImage split to Artifacts + if: endsWith(matrix.installer_artifact_name, '-appimage') && github.event.inputs.upload_artifact + uses: actions/upload-artifact@v3 with: - files: |- + name: ${{ matrix.installer_artifact_name }}-release + path: |- dist_electron/*.7z.* - upload_release: ${{ (github.event.release.tag_name || github.event.inputs.version) != '' }} - upload_artifact: ${{ github.event.inputs.upload_artifact }} + + - name: Upload Linux AppImage split to Release Assets + if: endsWith(matrix.installer_artifact_name, '-appimage') && (github.event.release.tag_name || github.event.inputs.version) != '' + uses: softprops/action-gh-release@v1 + with: prerelease: ${{ github.event.inputs.prerelease }} tag_name: ${{ env.VOICEVOX_EDITOR_VERSION }} + files: |- + dist_electron/*.7z.* target_commitish: ${{ github.sha }} - artifact_name: ${{ matrix.installer_artifact_name }}-release - - name: Upload macOS dmg - if: endsWith(matrix.installer_artifact_name, '-dmg') - uses: ./.github/actions/upload-release-and-artifact + - name: Upload macOS dmg to Artifacts + if: endsWith(matrix.installer_artifact_name, '-dmg') && github.event.inputs.upload_artifact + uses: actions/upload-artifact@v3 with: - files: |- + name: ${{ matrix.installer_artifact_name }}-release + path: |- dist_electron/*.dmg - upload_release: ${{ (github.event.release.tag_name || github.event.inputs.version) != '' }} - upload_artifact: ${{ github.event.inputs.upload_artifact }} + + - name: Upload macOS dmg to Release Assets + if: endsWith(matrix.installer_artifact_name, '-dmg') && (github.event.release.tag_name || github.event.inputs.version) != '' + uses: softprops/action-gh-release@v1 + with: prerelease: ${{ github.event.inputs.prerelease }} tag_name: ${{ env.VOICEVOX_EDITOR_VERSION }} + files: |- + dist_electron/*.dmg target_commitish: ${{ github.sha }} - artifact_name: ${{ matrix.installer_artifact_name }} - name: Create Windows NSIS Web artifact directory if: endsWith(matrix.installer_artifact_name, '-nsis-web') @@ -537,16 +557,22 @@ jobs: NEW_NAME=${OLD_NAME// /.} mv "${OLD_NAME}" $NEW_NAME - - name: Upload Windows NSIS Web - if: endsWith(matrix.installer_artifact_name, '-nsis-web') - uses: ./.github/actions/upload-release-and-artifact + - name: Upload Windows NSIS Web to Artifacts + if: endsWith(matrix.installer_artifact_name, '-nsis-web') && github.event.inputs.upload_artifact + uses: actions/upload-artifact@v3 with: - files: |- + name: ${{ matrix.installer_artifact_name }}-release + path: |- nsis-web-artifact/*.7z.* nsis-web-artifact/*.exe - upload_release: ${{ (github.event.release.tag_name || github.event.inputs.version) != '' }} - upload_artifact: ${{ github.event.inputs.upload_artifact }} + + - name: Upload Windows NSIS Web to Release Assets + if: endsWith(matrix.installer_artifact_name, '-nsis-web') && (github.event.release.tag_name || github.event.inputs.version) != '' + uses: softprops/action-gh-release@v1 + with: prerelease: ${{ github.event.inputs.prerelease }} tag_name: ${{ env.VOICEVOX_EDITOR_VERSION }} + files: |- + nsis-web-artifact/*.7z.* + nsis-web-artifact/*.exe target_commitish: ${{ github.sha }} - artifact_name: ${{ matrix.installer_artifact_name }}