diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 45ece78..e279e83 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -8,12 +8,27 @@ on: env: GITHUB_USERNAME: x-access-token GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} + OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} + GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} jobs: deploy-github: - name: Deploy to GitHub Package Registry + name: GitHub runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Deploy to GitHub Package Registry + - name: Deploy to GitHub run: ./mvnw --batch-mode --settings settings.xml -Pgithub clean deploy + + deploy-sonatype: + name: Sonatype + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Import GPG Keys + run: | + gpg --keyserver keyserver.ubuntu.com --recv-keys ${{ secrets.GPG_PUBLIC_KEY }} + echo "${{ secrets.GPG_PRIVATE_KEY }}" | gpg --import --no-tty --batch --yes - + - name: Deploy to Sonatype + run: ./mvnw --batch-mode --settings settings.xml -Possrh,sign clean deploy diff --git a/pom.xml b/pom.xml index 3230f75..7de91ef 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ io.github.kezhenxu94 cache-lite - 0.1.6-SNAPSHOT + 0.1.6 cache-lite An extremely light-weight cache framework for Kotlin @@ -30,7 +30,7 @@ scm:git:git://github.com/kezhenxu94/cache-lite.git scm:git:git@github.com:kezhenxu94/cache-lite.git https://github.com/kezhenxu94/cache-lite - v0.1.3 + v0.1.6 @@ -57,10 +57,6 @@ 1.3.71 4.12 1.8 - - gpg - ${env.GPG_KEY_NAME} - ${env.GPG_PASSPHRASE} @@ -81,6 +77,12 @@ + + + --pinentry-mode + loopback + + @@ -247,6 +249,7 @@ true false forked-path + -DskipTests diff --git a/settings.xml b/settings.xml index 4349894..bb0e1ec 100644 --- a/settings.xml +++ b/settings.xml @@ -7,6 +7,12 @@ + + sign + + ${env.GPG_PASSPHRASE} + + github