Skip to content

Commit

Permalink
Create maven-publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
redmitry authored Oct 18, 2023
1 parent a42f54a commit 22886c9
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Maven Deploy

on:
push:
branches:
- master

jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
server-id: gitlab-bsc-maven # Value of the distributionManagement/repository/id field of the pom.xml
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
settings-path: ${{ github.workspace }} # location for the settings.xml file

- name: Build with Maven
run: mvn -B package --file pom.xml

- name: Deploy to BSC GitLab Maven Repository
run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml
env:
MAVEN_USERNAME: gitlab-bsc-maven
MAVEN_PASSWORD: ${{ secrets.BSC_GITLAB_MAVEN_REPO }}

0 comments on commit 22886c9

Please sign in to comment.