From 5145f5d8f954863685cac0da7a5711e346285b73 Mon Sep 17 00:00:00 2001 From: Hiroshiba Date: Wed, 20 Sep 2023 00:46:12 +0900 Subject: [PATCH] =?UTF-8?q?main=E3=83=96=E3=83=A9=E3=83=B3=E3=83=81?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E3=81=A7=E6=9C=80=E6=96=B0=E7=89=88=E3=81=8C?= =?UTF-8?q?-nightly=E3=81=AB=E3=83=AA=E3=83=AA=E3=83=BC=E3=82=B9=E3=81=95?= =?UTF-8?q?=E3=82=8C=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E3=81=99=E3=82=8B?= =?UTF-8?q?=20(#1484)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 1 + .github/workflows/release_latest_dev.yml | 43 ++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 .github/workflows/release_latest_dev.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 60652ea503..97f7817c1f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,6 +19,7 @@ on: code_signing: description: "コード署名する" type: boolean + default: false upload_artifact: description: "デバッグ用に成果物をartifactにアップロードするか" type: boolean diff --git a/.github/workflows/release_latest_dev.yml b/.github/workflows/release_latest_dev.yml new file mode 100644 index 0000000000..5c86fe9fe9 --- /dev/null +++ b/.github/workflows/release_latest_dev.yml @@ -0,0 +1,43 @@ +name: Release latest dev build + +# mainブランチが更新されるたびに開発版をビルドしてデプロイする。 +# バージョン(タグ)は最新リリースのバージョンを`X.Y.Z`としたときの`X.Y+1.0-dev`。 + +on: + push: + branches: + - main + paths-ignore: + - "docs/**" + - "tests/**" + +jobs: + latest-dev-build: + runs-on: ubuntu-latest + if: github.repository_owner == 'VOICEVOX' + steps: + - name: Trigger workflow_dispatch + uses: actions/github-script@v6 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + const latest_release = await github.rest.repos.getLatestRelease({ + owner: context.repo.owner, + repo: context.repo.repo + }); + + const split_version = latest_release.data.tag_name.split('.'); + const dev_version = `${split_version[0]}.${parseInt(split_version[1]) + 1}.0-dev`; + + github.rest.actions.createWorkflowDispatch({ + owner: context.repo.owner, + repo: context.repo.repo, + workflow_id: 'build.yml', + ref: 'main', + inputs: { + version: dev_version, + prerelease: true + } + }) + + console.log(`Triggered workflow_dispatch for ${dev_version}`);