Skip to content

Merge pull request #76 from Commonjava/dependabot/maven/atlas-version… #89

Merge pull request #76 from Commonjava/dependabot/maven/atlas-version…

Merge pull request #76 from Commonjava/dependabot/maven/atlas-version… #89

Workflow file for this run

#
# Copyright (C) 2022-2023 Red Hat, Inc. (https://github.com/Commonjava/indy-model)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Merge / Push Build
on:
push:
branches:
- 'main'
- '1.x'
paths:
- 'addons/**'
- 'core-java/**'
- 'event/**'
- 'pom.xml'
jobs:
publish-snapshot:
name: publish to oss sonatype
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v6
- name: Set up JDK
uses: actions/setup-java@v5
with:
distribution: 'temurin'
architecture: x64
java-version: 17
- uses: s4u/maven-settings-action@v4.0.0
with:
sonatypeSnapshots: true
- uses: s4u/maven-settings-action@v4.0.0
if: ${{ github.event_name == 'push' }}
with:
servers: |
[{
"id": "central-portal-snapshots",
"username": "${{ secrets.SONATYPE_BOT_USERNAME }}",
"password": "${{ secrets.SONATYPE_BOT_TOKEN }}"
}]
- name: "Maven Build & Deploy Snapshot to Sonatype OSSRH"
if: ${{ github.event_name == 'push' }}
run: mvn -B -e deploy -DaltDeploymentRepository=sonatype::default::https://oss.sonatype.org/content/repositories/snapshots/