From 6d750184965dc3b1165be530bb5d0acbdd096224 Mon Sep 17 00:00:00 2001 From: Hiroshiba Kazuyuki Date: Thu, 23 Mar 2023 15:16:16 +0900 Subject: [PATCH 1/3] =?UTF-8?q?upload=20release=E3=82=84upload=20artifact?= =?UTF-8?q?=E3=82=92=E5=80=8B=E5=88=A5=E3=81=AB=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../upload-release-and-artifact/action.yml | 50 ---------- .github/workflows/build.yml | 96 ++++++++++++------- 2 files changed, 61 insertions(+), 85 deletions(-) delete mode 100644 .github/actions/upload-release-and-artifact/action.yml 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..62f94adf0c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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.release.tag_name || github.event.inputs.version) != '' + 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.inputs.upload_artifact + 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.release.tag_name || github.event.inputs.version) != '' + 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.inputs.upload_artifact + 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.release.tag_name || github.event.inputs.version) != '' + 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.inputs.upload_artifact + 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.release.tag_name || github.event.inputs.version) != '' + 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.inputs.upload_artifact + 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.release.tag_name || github.event.inputs.version) != '' + 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.inputs.upload_artifact + 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 }} From c923b4a4471c1aa5a8ad71cb92112bbb423ca490 Mon Sep 17 00:00:00 2001 From: Hiroshiba Kazuyuki Date: Thu, 23 Mar 2023 15:26:53 +0900 Subject: [PATCH 2/3] =?UTF-8?q?release=E3=81=A8asset=E3=81=AE=E5=88=A4?= =?UTF-8?q?=E5=AE=9A=E3=81=8C=E9=80=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 62f94adf0c..774659b0aa 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -376,7 +376,7 @@ jobs: rm $name.tar - name: Upload Linux tar.gz (without nvidia) to Artifacts - if: startsWith(matrix.artifact_name, 'linux-') && !contains(matrix.artifact_name, 'nvidia') && (github.event.release.tag_name || github.event.inputs.version) != '' + if: startsWith(matrix.artifact_name, 'linux-') && !contains(matrix.artifact_name, 'nvidia') && github.event.inputs.upload_artifact uses: actions/upload-artifact@v3 with: name: ${{ matrix.artifact_name }}-targz @@ -384,7 +384,7 @@ jobs: ${{ matrix.compressed_artifact_name }}-${{ env.VOICEVOX_EDITOR_VERSION }}.tar.gz - name: Upload Linux tar.gz (without nvidia) to Release Assets - if: startsWith(matrix.artifact_name, 'linux-') && !contains(matrix.artifact_name, 'nvidia') && github.event.inputs.upload_artifact + 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 }} @@ -408,7 +408,7 @@ jobs: 7z rn $name.zip prepackage/ VOICEVOX/ - 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.release.tag_name || github.event.inputs.version) != '' + 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: name: ${{ matrix.artifact_name }}-zip @@ -416,7 +416,7 @@ jobs: ${{ matrix.compressed_artifact_name }}-${{ env.VOICEVOX_EDITOR_VERSION }}.zip - 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.inputs.upload_artifact + 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 }} @@ -503,7 +503,7 @@ jobs: done - name: Upload Linux AppImage split to Artifacts - if: endsWith(matrix.installer_artifact_name, '-appimage') && (github.event.release.tag_name || github.event.inputs.version) != '' + if: endsWith(matrix.installer_artifact_name, '-appimage') && github.event.inputs.upload_artifact uses: actions/upload-artifact@v3 with: name: ${{ matrix.installer_artifact_name }}-release @@ -511,7 +511,7 @@ jobs: dist_electron/*.7z.* - name: Upload Linux AppImage split to Release Assets - if: endsWith(matrix.installer_artifact_name, '-appimage') && github.event.inputs.upload_artifact + 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 }} @@ -521,7 +521,7 @@ jobs: target_commitish: ${{ github.sha }} - name: Upload macOS dmg to Artifacts - if: endsWith(matrix.installer_artifact_name, '-dmg') && (github.event.release.tag_name || github.event.inputs.version) != '' + if: endsWith(matrix.installer_artifact_name, '-dmg') && github.event.inputs.upload_artifact uses: actions/upload-artifact@v3 with: name: ${{ matrix.installer_artifact_name }}-release @@ -529,7 +529,7 @@ jobs: dist_electron/*.dmg - name: Upload macOS dmg to Release Assets - if: endsWith(matrix.installer_artifact_name, '-dmg') && github.event.inputs.upload_artifact + 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 }} @@ -558,7 +558,7 @@ jobs: mv "${OLD_NAME}" $NEW_NAME - name: Upload Windows NSIS Web to Artifacts - if: endsWith(matrix.installer_artifact_name, '-nsis-web') && (github.event.release.tag_name || github.event.inputs.version) != '' + if: endsWith(matrix.installer_artifact_name, '-nsis-web') && github.event.inputs.upload_artifact uses: actions/upload-artifact@v3 with: name: ${{ matrix.installer_artifact_name }}-release @@ -567,7 +567,7 @@ jobs: nsis-web-artifact/*.exe - name: Upload Windows NSIS Web to Release Assets - if: endsWith(matrix.installer_artifact_name, '-nsis-web') && github.event.inputs.upload_artifact + 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 }} From 7b08e6051315083dd8415859c0a4211cabc5c276 Mon Sep 17 00:00:00 2001 From: Hiroshiba Date: Fri, 24 Mar 2023 03:56:03 +0900 Subject: [PATCH 3/3] =?UTF-8?q?999.999.999-develop=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 774659b0aa..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: