mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

vharseko
03.35.2021 a3ca95a7f2b5b8f4575f01ecc6347a62cef0d51b
actions: separate deploy (#182)

1 files deleted
2 files added
1 files modified
152 ■■■■ changed files
.github/workflows/build.yml 33 ●●●●● patch | view | raw | blame | history
.github/workflows/deploy.yml 48 ●●●●● patch | view | raw | blame | history
.github/workflows/maven.yml 68 ●●●●● patch | view | raw | blame | history
README.md 3 ●●●● patch | view | raw | blame | history
.github/workflows/build.yml
New file
@@ -0,0 +1,33 @@
name: Build Maven
on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]
jobs:
  build:
    name: Maven build
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        java: [ '8', '11']
        os: [ 'ubuntu-latest', 'macos-latest', 'windows-latest' ]
    steps:
    - uses: actions/checkout@v2
    - name: Java ${{ matrix.Java }} (${{ matrix.os }})
      uses: actions/setup-java@v2
      with:
        java-version: ${{ matrix.java }}
        distribution: 'adopt'
    - name: Cache Maven packages
      uses: actions/cache@v2
      with:
         path: ~/.m2/repository
         key: ${{ runner.os }}-m2-repository-${{ hashFiles('**/pom.xml') }}
         restore-keys: ${{ runner.os }}-m2-repository
    - name: Build with Maven
      env:
        MAVEN_OPTS: -Dhttps.protocols=TLSv1.2 -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 -Dmaven.wagon.http.retryHandler.requestSentEnabled=true -Dmaven.wagon.http.retryHandler.count=10
      run: mvn --batch-mode  --update-snapshots package --file pom.xml
.github/workflows/deploy.yml
New file
@@ -0,0 +1,48 @@
name: Deploy Maven
on:
  workflow_run:
    push:
       branches: [ master ]
    workflows: ["Build Maven"]
    types: [completed]
  workflow_dispatch:
jobs:
  deploy:
    name: Maven deploy
    if: ${{ github.event.workflow_run.conclusion == 'success' || github.event.workflow_run.conclusion == '' }}
    runs-on: 'ubuntu-latest'
    steps:
      - name: Print github context
        env:
          GITHUB_CONTEXT: ${{ toJSON(github) }}
        run: echo "$GITHUB_CONTEXT"
      - name: Install gpg secret key
        env:
           GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
        if: ${{ env.GPG_PRIVATE_KEY!=''}}
        run: |
           cat <(echo -e "${{ secrets.GPG_PRIVATE_KEY }}") | gpg --batch --import
           gpg --list-secret-keys --keyid-format LONG
      - uses: actions/checkout@v2
      - name: Set up Java for publishing to Maven Central Repository OSS
        uses: actions/setup-java@v2
        with:
          java-version: '8'
          distribution: 'adopt'
          server-id: ossrh
          server-username: MAVEN_USERNAME
          server-password: MAVEN_PASSWORD
      - name: Cache Maven packages
        uses: actions/cache@v2
        with:
         path: ~/.m2/repository
         key: ${{ runner.os }}-m2-repository-${{ hashFiles('**/pom.xml') }}
         restore-keys: ${{ runner.os }}-m2-repository
      - name: Publish to the Maven Central Repository
        env:
          MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
          MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
          MAVEN_OPTS: -Dhttps.protocols=TLSv1.2 -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 -Dmaven.wagon.http.retryHandler.requestSentEnabled=true -Dmaven.wagon.http.retryHandler.count=10
        if: ${{ env.MAVEN_USERNAME!='' && env.MAVEN_PASSWORD!=''}}
        run: mvn --batch-mode --update-snapshots -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }} deploy --file pom.xml
.github/workflows/maven.yml
File was deleted
README.md
@@ -1,6 +1,7 @@
# <img alt="OpenDJ Logo" src="https://github.com/OpenIdentityPlatform/OpenDJ/raw/master/logo.png" width="300"/>
[![Latest release](https://img.shields.io/github/release/OpenIdentityPlatform/OpenDJ.svg)](https://github.com/OpenIdentityPlatform/OpenDJ/releases)
[![Build](https://github.com/OpenIdentityPlatform/OpenDJ/actions/workflows/maven.yml/badge.svg)](https://github.com/OpenIdentityPlatform/OpenDJ/actions/workflows/maven.yml)
[![Build](https://github.com/OpenIdentityPlatform/OpenDJ/actions/workflows/build.yml/badge.svg)](https://github.com/OpenIdentityPlatform/OpenDJ/actions/workflows/build.yml)
[![Deploy](https://github.com/OpenIdentityPlatform/OpenDJ/actions/workflows/deploy.yml/badge.svg)](https://github.com/OpenIdentityPlatform/OpenDJ/actions/workflows/deploy.yml)
[![Issues](https://img.shields.io/github/issues/OpenIdentityPlatform/OpenDJ.svg)](https://github.com/OpenIdentityPlatform/OpenDJ/issues)
[![Last commit](https://img.shields.io/github/last-commit/OpenIdentityPlatform/OpenDJ.svg)](https://github.com/OpenIdentityPlatform/OpenDJ/commits/master)
[![License](https://img.shields.io/badge/license-CDDL-blue.svg)](https://github.com/OpenIdentityPlatform/OpenDJ/blob/master/LICENSE.md)