From 9bbbb665a9669bed8096f88e54e4502fab6316f5 Mon Sep 17 00:00:00 2001 From: Tintinkung Date: Mon, 22 Apr 2024 21:03:14 +0700 Subject: [PATCH] feat: github package token --- .github/workflows/maven-publish.yml | 4 ++-- pom.xml | 2 +- settings.xml | 37 +++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+), 3 deletions(-) create mode 100644 settings.xml diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml index 2c93e4d..4fac9c1 100644 --- a/.github/workflows/maven-publish.yml +++ b/.github/workflows/maven-publish.yml @@ -23,12 +23,12 @@ jobs: java-version: '17' distribution: 'temurin' server-id: github # Value of the distributionManagement/repository/id field of the pom.xml - # settings-path: ${{ github.workspace }} # location for the settings.xml file + settings-path: ${{ github.workspace }} # location for the settings.xml file - name: Build with Maven run: mvn -B package --file pom.xml - name: Publish to GitHub Packages Apache Maven - run: mvn --batch-mode deploy # run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml + run: mvn --batch-mode deploy -s $GITHUB_WORKSPACE/settings.xml env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/pom.xml b/pom.xml index 69823c9..75d914d 100644 --- a/pom.xml +++ b/pom.xml @@ -55,7 +55,7 @@ - github + aseanbte-repo GitHub Packages https://maven.pkg.github.com/asean-build-the-earth/alps-lib-asean diff --git a/settings.xml b/settings.xml new file mode 100644 index 0000000..8cda2f1 --- /dev/null +++ b/settings.xml @@ -0,0 +1,37 @@ + + + + github + + + + + github + + + central + https://repo1.maven.org/maven2 + + + github + https://maven.pkg.github.com/asean-build-the-earth/alps-lib-asean + + true + + + + + + + + + aseanbte-repo + asean-build-the-earth + + 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 + + + \ No newline at end of file