-
Notifications
You must be signed in to change notification settings - Fork 12
36 lines (29 loc) · 981 Bytes
/
snapshot.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# SPDX-FileCopyrightText: 2023 iteratec GmbH
#
# SPDX-License-Identifier: Apache-2.0
# This workflow will publish a Java project with Maven
# See https://github.com/jonashackt/github-actions-release-maven
name: Publish Snapshot
on:
push:
branches: ['main']
jobs:
publish-snapshot:
runs-on: ubuntu-22.04
if: github.repository == 'secureCodeBox/defectdojo-client-java'
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: temurin
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Build & Publish to Maven Central
run: mvn -U -B clean deploy # -U: force updates for dependencies, -B: no user input
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}