Merge pull request #127 from gappc/feature-127-implement-2022-10 #54
Workflow file for this run
This file contains 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: CI/CD | |
on: | |
push: | |
pull_request: | |
env: | |
JAVA_VERSION: '8' | |
ODH_OSSRH_GPG_KEY_BASE_64: ${{ secrets.ODH_OSSRH_GPG_KEY_BASE_64 }} | |
jobs: | |
test: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: REUSE Compliance Check | |
uses: fsfe/reuse-action@v1 | |
- uses: noi-techpark/github-actions/maven-test@v2 | |
with: | |
java-version: ${{ env.JAVA_VERSION }} | |
test-command: mvn -B -U clean verify -P it,sources | |
deploy: | |
runs-on: ubuntu-20.04 | |
if: startsWith(github.ref, 'refs/tags/v') | |
needs: test | |
concurrency: deploy | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Import gpg key | |
run: echo "${{ env.ODH_OSSRH_GPG_KEY_BASE_64 }}" | gpg --import | |
- name: Set up Java | |
uses: actions/setup-java@v2 | |
with: | |
java-version: ${{ env.JAVA_VERSION }} | |
distribution: 'temurin' | |
cache: 'maven' | |
- name: Create a settings.xml file | |
env: | |
SETTINGS_XML: | | |
<settings> | |
<servers> | |
<server> | |
<id>ossrh</id> | |
<username>${{ secrets.ODH_OSSRH_USERNAME }}</username> | |
<password>${{ secrets.ODH_OSSRH_PASSWORD }}</password> | |
</server> | |
</servers> | |
<profiles> | |
<profile> | |
<id>ossrh</id> | |
<activation> | |
<activeByDefault>true</activeByDefault> | |
</activation> | |
<properties> | |
<gpg.executable>gpg2</gpg.executable> | |
</properties> | |
</profile> | |
</profiles> | |
</settings> | |
run: echo "$SETTINGS_XML" > ~/.m2/settings.xml | |
- name: Release SDK | |
run: | | |
THIS_VERSION=${GITHUB_REF/refs\/tags\/v/} | |
mvn versions:set -DnewVersion="$THIS_VERSION" | |
mvn -B -U clean deploy -P release,sources | |