Skip to content

Commit

Permalink
cicd: add 2 workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeff-Tian committed Oct 19, 2023
1 parent 4203119 commit 11971e8
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/mavenpublish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Maven Package

on:
release:
types: [released]
push:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 18
uses: actions/setup-java@v1
with:
java-version: 18
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file

- name: Test
run: mvn clean test

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

- name: Publish to GitHub Packages Apache Maven
run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml
env:
GITHUB_TOKEN: ${{ github.token }}
9 changes: 9 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,15 @@
<version.keycloak>21.0.2</version.keycloak>
</properties>


<distributionManagement>
<repository>
<id>github</id>
<name>GitHub OWNER Apache Maven Packages</name>
<url>https://maven.pkg.github.com/cooperlyt/keycloak-phone-provider</url>
</repository>
</distributionManagement>

<modules>
<module>keycloak-phone-provider</module>
<module>keycloak-phone-provider.resources</module>
Expand Down

0 comments on commit 11971e8

Please sign in to comment.