Build Snapshot #31
Workflow file for this run
This file contains hidden or 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: Build Snapshot | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| branch: | |
| description: "The branch to build a SNAPSHOT from." | |
| required: true | |
| default: "main" | |
| jobs: | |
| deploy: | |
| name: Build SNAPSHOT | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v2 | |
| with: | |
| fetch-depth: 0 | |
| ref: ${{ github.event.inputs.branch }} | |
| - name: Set up JDK | |
| uses: actions/setup-java@v2 | |
| with: | |
| distribution: 'adopt' | |
| java-version: '8' | |
| java-package: jdk | |
| # this creates a settings.xml with the following server | |
| settings-path: ${{ github.workspace }} | |
| server-id: sonatype-nexus-snapshots # Value of the distributionManagement/repository/id field of the pom.xml | |
| server-username: SONATYPE_USERNAME # env variable for username in deploy | |
| server-password: SONATYPE_PASSWORD # env variable for token in deploy | |
| # only signed artifacts will be released to maven central. this sets up things for the maven-gpg-plugin | |
| 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: Run Maven Targets | |
| run: mvn deploy javadoc:javadoc --settings $GITHUB_WORKSPACE/settings.xml --batch-mode --show-version --activate-profiles sonatype-oss-release-github-actions | |
| env: | |
| SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | |
| SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | |
| GPG_PASSPHRASE: ${{ secrets.GPG_PRIVATE_KEY_PASSPHRASE }} |