Skip to content

tag_name

tag_name #5

Workflow file for this run

name: Release nightly
on:
push:
# branches:
# - main
jobs:
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_version = await github.rest.repos.getLatestRelease({
owner: context.repo.owner,
repo: context.repo.repo
}).tag_name;
const split_version = latest_version.split('.');
const nightly_version = `${split_version[0]}.${parseInt(split_version[1]) + 1}.0-nightly`;
github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: 'build.yml',
ref: 'main',
inputs: {
version: nightly_version,
prerelease: true
}
})