Skip to content

Initial Implementation of OpenTelemetry Metrics Publisher for Java AWS SDK #6

Initial Implementation of OpenTelemetry Metrics Publisher for Java AWS SDK

Initial Implementation of OpenTelemetry Metrics Publisher for Java AWS SDK #6

Workflow file for this run

name: Java CI
on:
push:
branches: [ main ]
tags: [ '*' ] # This triggers the workflow on any tag push
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
java-version: [ '17', '21' ]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java-version }}
distribution: 'corretto'
cache: maven
- name: Grant execute permission for Maven Wrapper
if: runner.os != 'Windows'
run: chmod +x mvnw
- name: Build with Maven Wrapper
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
./mvnw.cmd clean verify
else
./mvnw clean verify
fi
- name: Upload test results
if: always()
uses: actions/upload-artifact@v3
with:
name: test-results
path: target/surefire-reports/*.xml
deploy:
needs: build
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'corretto'
- name: Set up GPG
run: |
echo "${{ secrets.GPG_PRIVATE_KEY }}" | gpg --import
echo "default-key ${GPG_KEY_ID}" >> ~/.gnupg/gpg.conf
env:
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
- name: Grant execute permission for Maven Wrapper
if: runner.os != 'Windows'
run: chmod +x mvnw
- name: Deploy to Maven Central
run: ./mvnw clean deploy -P release
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}