forked from ant-media/StreamApp
-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (59 loc) · 2.12 KB
/
main.yaml
File metadata and controls
71 lines (59 loc) · 2.12 KB
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
name: Build and Deploy Java Project
on:
push:
branches: [ '**' ]
tags: [ '*' ]
pull_request:
branches: [ '**' ]
jobs:
build:
runs-on: ubuntu-22.04 # Ubuntu Jammy equivalent
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'adopt' # AdoptOpenJDK's new name
cache: 'maven'
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '16.20.2'
cache: 'npm'
- name: Clone and build parent project
run: |
git clone --depth=1 -b ${{ github.ref_name }} https://github.com/ant-media/ant-media-server-parent.git || git clone --depth=1 https://github.com/ant-media/ant-media-server-parent.git
cd ant-media-server-parent
mvn clean install -DskipTests -Dmaven.javadoc.skip=true -Dgpg.skip=true --quiet
cd ..
- name: Clone and build server project
run: |
git clone --depth=1 -b ${{ github.ref_name }} https://github.com/ant-media/Ant-Media-Server.git || git clone --depth=1 https://github.com/ant-media/Ant-Media-Server.git
cd Ant-Media-Server
mvn clean install -DskipTests -Dmaven.javadoc.skip=true -Dgpg.skip=true --quiet
cd ..
- name: Install and compile npm packages
run: |
pwd
ls -alh
npm install
npm run compile
cd embedded-player
npm install
npm run compile
npm run deploy
cd ..
- name: Install Maven packages
run: mvn install -DskipTests=true -Dmaven.javadoc.skip=true -Dgpg.skip=true -B -V --quiet
- name: Deploy
run: |
export GPG_TTY=$(tty)
gpg --list-keys
mvn deploy -DskipTests --settings mvn-settings.xml
env:
# Add your Maven credentials as secrets
CI_DEPLOY_USERNAME: ${{ secrets.CI_DEPLOY_USERNAME }}
CI_DEPLOY_PASSWORD: ${{ secrets.CI_DEPLOY_PASSWORD }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}