Skip to content

- minor fix to github action #18

- minor fix to github action

- minor fix to github action #18

Workflow file for this run

name: es4j-publish
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '17'
- name: Build with Maven
run: mvn -B package -Dmaven.javadoc.skip=true --file pom.xml -DskipTests
- name: Publish to GitHub Packages Apache Maven
run: mvn deploy -DskipTests
env:
GITHUB_TOKEN: ${{ github.token }} # GITHUB_TOKEN is the default env for the password
- name: Set up Apache Maven Central
uses: actions/setup-java@v3
with: # running setup-java again overwrites the settings.xml
distribution: 'adopt'
java-version: '17'
server-id: maven # Value of the distributionManagement/repository/id field of the pom.xml
server-username: OSSRH_USERNAME # env variable for username in deploy
server-password: OSSRH_PASSWORD # env variable for token in deploy
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} # Value of the GPG private key to import
gpg-passphrase: GPG_PASSPHRASE # env variable for GPG private key passphrase
- name: Publish to Apache Maven Central
run: mvn deploy -DskipTests
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.OSSRH_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}