diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 05a6460..954cd55 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -1,7 +1,8 @@ name: CD on: - push: + # push: + pull_request jobs: build: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8d57e94..2a719cf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,7 +1,8 @@ name: CI on: - pull_request: + # pull_request: + push jobs: build: @@ -23,7 +24,14 @@ jobs: - name: Build with Maven run: | mvn -B -P github package -file pom.xml - mkdir staging && cp target/*.jar staging + cat $GITHUB_WORKSPACE/settings.xml + # mkdir staging && cp target/*.jar staging + + - name: Publish to GitHub Packages Apache Maven + run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml + env: + GITHUB_USER_REF: ${{ secrets.GH_PACKAGE_REPO_USERNAME }} + GITHUB_TOKEN_REF: ${{ secrets.GH_PACKAGE_REPO_PASSWORD }} - name: upload artifact uses: actions/upload-artifact@v4