use maven_jni_25.yml as workflow call for dev build script #306
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: Make branch snapshot and deploy | |
| on: | |
| push: | |
| branches-ignore: | |
| - main | |
| - 'release/**' | |
| jobs: | |
| publish: | |
| if: github.repository == 'eclipse-serializer/serializer' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Java for publishing to Maven Central Snapshot Repository | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| cache: 'maven' | |
| server-id: ossrh | |
| server-username: MAVEN_USERNAME | |
| server-password: MAVEN_PASSWORD | |
| - name: Prepare suffix | |
| run: | | |
| suffix=$(echo -n "${GITHUB_REF#refs/heads/}" | tr '/' '_' | cut -c1-10)-$(echo -n "${GITHUB_REF#refs/heads/}" | md5sum | cut -c1-10) | |
| echo "Suffix: $suffix" | |
| echo "SUFFIX=$suffix" >> $GITHUB_ENV | |
| - name: Update project version | |
| run: | | |
| currentVersion=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec) | |
| newVersion="${currentVersion%-SNAPSHOT}-$SUFFIX-SNAPSHOT" | |
| mvn versions:set -DnewVersion=$newVersion --batch-mode | |
| - name: Make a snapshot | |
| run: mvn -Pdeploy -Pproduction --no-transfer-progress --batch-mode clean deploy | |
| env: | |
| MAVEN_USERNAME: ${{ secrets.CENTRAL_SONATYPE_TOKEN_USERNAME }} | |
| MAVEN_PASSWORD: ${{ secrets.CENTRAL_SONATYPE_TOKEN_PASSWORD }} | |
| MAVEN_GPG_PASSPHRASE: ${{ secrets.ORG_GPG_PASSPHRASE }} | |
| MAVEN_GPG_KEY: ${{ secrets.ORG_GPG_PRIVATE_KEY }} | |
| build-native-jar: | |
| needs: publish | |
| uses: ./.github/workflows/maven_jni_25.yml |