-
-
Notifications
You must be signed in to change notification settings - Fork 11
114 lines (98 loc) · 3.33 KB
/
ci.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
name: Build & Test
on:
push:
branches: [ develop ]
paths:
- '**.yml'
- '**.kt'
- '**.kts'
- '**.tidy'
pull_request:
branches: [ develop ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
# Needed until Vosk provide a new release to fix Windows issues
- name: Checkout vosk-api
uses: actions/checkout@v3
with:
repository: alphacep/vosk-api
ref: fff40ce1a1f1b921272a184acfd0c21350750789
path: vosk-api
- name: Build & install Vosk with working native libraries
run: |
cd vosk-api/java/lib/src/main/resources
wget -q https://repo1.maven.org/maven2/com/alphacephei/vosk/0.3.38/vosk-0.3.38.jar
unzip -nq vosk-0.3.38.jar
rm -rf META-INF org
rm vosk-0.3.38.jar
cd ../../..
echo 'rootProject.name = "vosk"' > settings.gradle.kts
sed -i '10d;21,25d' build.gradle
sed -i '80s/^/\/\//' src/main/java/org/vosk/LibVosk.java
sed -i '218s/^/\/\//' src/main/java/org/vosk/Recognizer.java
gradle publishToMavenLocal
- name: Checkout jAdapterForNativeTTS
uses: actions/checkout@v3
with:
repository: jonelo/jAdapterForNativeTTS
path: jAdapterForNativeTTS
- name: Build jAdapterForNativeTTS
run: cd jAdapterForNativeTTS && mvn install
- name: Build
run: |
./gradlew buildPlugin
./gradlew verifyPlugin
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: distribution
path: './build/distributions/idiolect.zip'
publish-to-beta:
runs-on: ubuntu-latest
needs: build
# Requires approval - https://github.com/OpenASR/idiolect/settings/environments/788279606/edit
environment: beta
env:
INTELLIJ_CHANNEL: beta
INTELLIJ_PUBLISH_TOKEN: ${{ secrets.INTELLIJ_PUBLISH_TOKEN }}
INTELLIJ_CERTIFICATE_CHAIN: ${{ secrets.INTELLIJ_CERTIFICATE_CHAIN }}
INTELLIJ_PRIVATE_KEY: ${{ secrets.INTELLIJ_PRIVATE_KEY }}
INTELLIJ_PRIVATE_KEY_PASSWORD: ${{ secrets.INTELLIJ_PRIVATE_KEY_PASSWORD }}
steps:
- uses: actions/checkout@v3
- name: Download artifact
uses: actions/download-artifact@v4.1.7
with:
name: distribution
path: './build/distributions'
- name: Publish to beta Marketplace
run: |
./gradlew publishPlugin -x buildPlugin -x verifyPlugin
publish-to-eap:
runs-on: ubuntu-latest
needs: build
# Requires approval - https://github.com/OpenASR/idiolect/settings/environments/788279606/edit
environment: eap
env:
INTELLIJ_CHANNEL: eap
INTELLIJ_PUBLISH_TOKEN: ${{ secrets.INTELLIJ_PUBLISH_TOKEN }}
INTELLIJ_CERTIFICATE_CHAIN: ${{ secrets.INTELLIJ_CERTIFICATE_CHAIN }}
INTELLIJ_PRIVATE_KEY: ${{ secrets.INTELLIJ_PRIVATE_KEY }}
INTELLIJ_PRIVATE_KEY_PASSWORD: ${{ secrets.INTELLIJ_PRIVATE_KEY_PASSWORD }}
steps:
- uses: actions/checkout@v3
- name: Download artifact
uses: actions/download-artifact@v4.1.7
with:
name: distribution
path: './build/distributions'
- name: Publish to eap Marketplace
run: |
./gradlew publishPlugin -x buildPlugin -x verifyPlugin