-
-
Notifications
You must be signed in to change notification settings - Fork 2
103 lines (81 loc) · 2.28 KB
/
console_build.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
name: Console Build
concurrency:
group: console_build_${{ github.ref }}
cancel-in-progress: true
on:
workflow_dispatch:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths-ignore:
- "**.md"
- "docs/**"
push:
paths-ignore:
- "**.md"
- "docs/**"
env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
jobs:
build_jar_for_linux_and_windows_x86_64:
name: Build Jar for Linux and Windows x86_64
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v3
- name: Setup JDK 17
uses: actions/setup-java@v3
with:
distribution: corretto
java-version: 17
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
gradle-version: 8.2
- name: Build the Artifact
run: |
cd console
gradle build --debug
- name: Upload the Artifact
uses: actions/upload-artifact@v3
with:
name: javet-shell-console-linux-windows_x86-64
path: console/build/libs/*.jar
build_jar_for_macos:
name: Build Jar for MacOS
runs-on: macos-latest
steps:
- name: Checkout the code
uses: actions/checkout@v3
- name: Setup JDK 17
uses: actions/setup-java@v3
with:
distribution: corretto
java-version: 17
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
gradle-version: 8.2
- name: Build the Artifact
run: |
cd console
gradle build --debug
- name: Upload the Artifact
uses: actions/upload-artifact@v3
with:
name: javet-shell-console-macos
path: console/build/libs/*.jar
build_docker_image_for_linux_x86_64:
name: Build Docker Image for Linux x86_64
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Docker Build and Push
run: |
docker build -t ${{ env.DOCKERHUB_USERNAME }}/javet-shell:amd64-latest -f docker/console.Dockerfile .
docker push ${{ env.DOCKERHUB_USERNAME }}/javet-shell:amd64-latest