Skip to content

github action

github action #1

Workflow file for this run

---
name: build
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: 21
distribution: 'temurin'
- name: Create settings.xml
uses: s4u/maven-settings-action@v2
with:
servers: '[{"id": "ossrh", "username": "mihxil", "password": "${{secrets.OSSRH_PASSWORD}}"}]'
- uses: crazy-max/ghaction-import-gpg@v3
with:
gpg-private-key: ${{ secrets.GPG_SECRET_KEY }}
passphrase: ${{ secrets.GPG_SECRET_KEY_PASSPHRASE }}
- name: Build with Maven
run: mvn -B deploy
- uses: codecov/codecov-action@v2
- name: Publish Test Report
uses: scacap/action-surefire-report@v1
if: always() && ${{ github.event_name == 'push' }}