Skip to content

Commit

Permalink
Add continuous integration workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
fmbenhassine committed Oct 27, 2023
1 parent 4503623 commit 47c3620
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: CI/CD build

on:
push:
branches: [ "main" ]

jobs:
build:
name: Build branch
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Set up JDK 17
uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 #v3.13.0
with:
java-version: '17'
distribution: 'temurin'
cache: 'maven'

- name: Build with Maven and deploy to Artifactory
env:
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
run: mvn -s settings.xml --batch-mode --update-snapshots deploy
19 changes: 19 additions & 0 deletions settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<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>spring-snapshots</id>
<username>${env.ARTIFACTORY_USERNAME}</username>
<password>${env.ARTIFACTORY_PASSWORD}</password>
</server>
<server>
<id>spring-milestones</id>
<username>${env.ARTIFACTORY_USERNAME}</username>
<password>${env.ARTIFACTORY_PASSWORD}</password>
</server>
</servers>

</settings>

0 comments on commit 47c3620

Please sign in to comment.