diff --git a/.github/workflows/install.yaml b/.github/workflows/install.yaml new file mode 100644 index 00000000..00560532 --- /dev/null +++ b/.github/workflows/install.yaml @@ -0,0 +1,43 @@ +name: Publish package to GitHub Packages +on: + push: + branches: + - "main" +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 + with: + java-version: "11" + distribution: "adopt" + - name: Generate settings.xml for Maven Builds + uses: whelk-io/maven-settings-xml-action@v20 + with: + servers: | + [ + { + "id": "github", + "username": "itaymelamed", + "password": "${{ secrets.GITHUB_TOKEN }}" + } + ] + repositories: | + [ + { + "id": "github", + "url": "https://maven.pkg.github.com/itaymelamed/simple-java-maven-app", + "snapshots": { + "enabled": "true" + }, + "releases": { + "enabled": "true" + } + } + ] + - name: Intsall + run: mvn -B package -s /home/runner/.m2/settings.xml --file pom.xml + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + USER_NAME: "itaymelamed" diff --git a/pom.xml b/pom.xml index fa02310f..b820ade1 100644 --- a/pom.xml +++ b/pom.xml @@ -8,7 +8,7 @@ 2.1.3.RELEASE - io.buildpacks.example + itaymelamed sample 0.0.1-SNAPSHOT sample @@ -20,18 +20,9 @@ - org.springframework.boot - spring-boot-starter-thymeleaf - - - org.springframework.boot - spring-boot-starter-web - - - - org.springframework.boot - spring-boot-starter-test - test + itaymelamed + my-app + 1.0 @@ -43,5 +34,11 @@ - + + + github + GitHub OWNER Apache Maven Packages + https://maven.pkg.github.com/itaymelamed/simple-java-maven-app + +