-
Notifications
You must be signed in to change notification settings - Fork 305
41 lines (36 loc) · 1.18 KB
/
release_latest.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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 hoge = await github.rest.repos.getLatestRelease({
owner: context.repo.owner,
repo: context.repo.repo
}).data
console.log(hoge)
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
}
})