Merge pull request #551 from ant-media/newPlaybackParams #74
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' # AdoptOpenJDK's new name | |
cache: 'maven' | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16.20.2' | |
cache: 'npm' | |
- name: Import GPG key | |
run: | | |
echo "${{ secrets.GPG_PRIVATE_KEY }}" | gpg --batch --yes --import | |
gpg --list-keys | |
- 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 Snapshot | |
run: mvn deploy -DskipTests --quiet --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 }} | |
- name: Deploy Release | |
if: startsWith(github.ref, 'refs/tags/ams-v') | |
run: mvn deploy -DskipTests --quiet --settings mvn-settings.xml | |
env: | |
CI_DEPLOY_USERNAME: ${{ secrets.CI_DEPLOY_USERNAME }} | |
CI_DEPLOY_PASSWORD: ${{ secrets.CI_DEPLOY_PASSWORD }} | |
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} |