Maven Publish Snapshot #2
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: Maven Publish Private | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| javaVersion: | |
| description: "Java version to use" | |
| default: "21" | |
| type: string | |
| mavenProperties: | |
| description: "Maven properties to use" | |
| default: "-DskipGithub=true" | |
| type: string | |
| mavenTasks: | |
| description: "Maven tasks to use" | |
| default: "clean install deploy" | |
| type: string | |
| jobs: | |
| build-and-publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set up JDK ${{ inputs.javaVersion }} | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: "${{ inputs.javaVersion }}" | |
| distribution: "temurin" | |
| - name: Set up Maven | |
| uses: hb0730/maven-action@v1.0.2 | |
| with: | |
| maven-version: 3.8.9 | |
| - name: Create Maven settings.xml | |
| run: | | |
| cat << 'EOF' > $HOME/.m2/settings.xml | |
| <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" | |
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 | |
| https://maven.apache.org/xsd/settings-1.0.0.xsd"> | |
| <servers> | |
| <server> | |
| <id>s3.applause-public-snapshots</id> | |
| <username>${{ secrets.APPLAUSE_REPO_USER_NAME }}</username> | |
| <password>${{ secrets.APPLAUSE_REPO_PASSWORD }}</password> | |
| </server> | |
| </servers> | |
| </settings> | |
| EOF | |
| - name: Publish | |
| run: | | |
| mvn ${{ inputs.mavenProperties }} ${{ inputs.mavenTasks }} |