-
-
Notifications
You must be signed in to change notification settings - Fork 2
81 lines (76 loc) · 3.31 KB
/
maven.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
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Java CI with Maven
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build-and-upload:
runs-on: ubuntu-latest
strategy:
fail-fast: true
steps:
- run: curl ifconfig.me
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn -B package --file pom.xml
# - name: copy jar to publish folder
# run: |
# mkdir api
# mkdir ability
# cp genshin-map-api/genshin-map-api-core/genshin-map-api-core-core/target/genshin-map-api-core-core-1.0.jar api/genshin-map-api-core-core-1.0.jar
# cp genshin-map-api/genshin-map-api-system/genshin-map-api-system-core/target/genshin-map-api-system-core-1.0.jar api/genshin-map-api-system-core-1.0.jar
# cp genshin-map-ability/genshin-map-ability-auth/target/genshin-map-ability-auth-1.0.jar ability/genshin-map-ability-auth-1.0.jar
# cp genshin-map-ability/genshin-map-ability-gateway/target/genshin-map-ability-gateway-1.0.jar ability/genshin-map-ability-gateway-1.0.jar
# - name: Deploy to Server
# uses: easingthemes/ssh-deploy@main
# env:
# SSH_PRIVATE_KEY: ${{ secrets.DEV_SERVER_SECRET }}
# ARGS: "-tIvzr --progress"
# SOURCE: "api/"
# REMOTE_HOST: ${{ secrets.DEV_SERVER_HOST }}
# REMOTE_PORT: ${{ secrets.DEV_SERVER_PORT }}
# REMOTE_USER: ${{ secrets.DEV_SERVER_USER }}
# TARGET: "~/genshin-map-cloud/api/"
# - name: Deploy to Server
# uses: easingthemes/ssh-deploy@main
# env:
# SSH_PRIVATE_KEY: ${{ secrets.DEV_SERVER_SECRET }}
# ARGS: "-tIvzr --progress"
# SOURCE: "ability/"
# REMOTE_HOST: ${{ secrets.DEV_SERVER_HOST }}
# REMOTE_PORT: ${{ secrets.DEV_SERVER_PORT }}
# REMOTE_USER: ${{ secrets.DEV_SERVER_USER }}
# TARGET: "~/genshin-map-cloud/ability/"
# - name: Upload api-core to Artifact
# uses: actions/[email protected]
# with:
# # Artifact name
# name: api-core
# path: genshin-map-api/genshin-map-api-core/genshin-map-api-core-core/target/genshin-map-api-core-core-1.0.jar
# - name: Upload api-system to Artifact
# uses: actions/[email protected]
# with:
# # Artifact name
# name: api-system
# path: genshin-map-api/genshin-map-api-system/genshin-map-api-system-core/target/genshin-map-api-system-core-1.0.jar
# - name: Upload ability-gateway to Artifact
# uses: actions/[email protected]
# with:
# # Artifact name
# name: ability-gateway
# path: genshin-map-ability/genshin-map-ability-gateway/target/genshin-map-ability-gateway-1.0.jar
# - name: Upload ability-gateway to Artifact
# uses: actions/[email protected]
# with:
# # Artifact name
# name: ability-auth
# path: genshin-map-ability/genshin-map-ability-auth/target/genshin-map-ability-auth-1.0.jar