From 2a5d8d560ca19faf021ca731fb50e50500c318b3 Mon Sep 17 00:00:00 2001 From: coderzc Date: Tue, 21 Dec 2021 11:21:09 +0800 Subject: [PATCH] release maven package by actions --- .github/workflows/ci.yml | 2 +- .github/workflows/release.yml | 39 +++++++++++++++++++ .../travis/install-hugegraph-from-source.sh | 2 +- pom.xml | 7 ++++ 4 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5124dc0d..2c53a906 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ on: jobs: build: - runs-on: ubuntu-16.04 + runs-on: ubuntu-20.04 env: TRAVIS_DIR: assembly/travis COMMIT_ID: 0dc7b271835e53136ee92691b07fa4abe925e16e diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..b0c20d26 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,39 @@ +name: release maven package + +on: + release: + types: [ published ] + +jobs: + build: + runs-on: ubuntu-20.04 + steps: + - name: Install JDK 8 + uses: actions/setup-java@v2 + with: + java-version: '8' + distribution: 'zulu' + + - name: Cache Maven packages + uses: actions/cache@v2 + with: + path: ~/.m2 + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2 + + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 2 + + - name: Release Maven package + uses: samuelmeuli/action-maven-publish@v1 + with: + gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} + gpg_passphrase: ${{ secrets.GPG_PASSPHRASE }} + nexus_username: ${{ secrets.NEXUS_USERNAME }} + nexus_password: ${{ secrets.NEXUS_PASSWORD }} + server_id: sonatype-nexus-staging + maven_profiles: "release" + maven_args: > + -Dmaven.test.skip=true diff --git a/assembly/travis/install-hugegraph-from-source.sh b/assembly/travis/install-hugegraph-from-source.sh index bfdb9013..31d7e89c 100755 --- a/assembly/travis/install-hugegraph-from-source.sh +++ b/assembly/travis/install-hugegraph-from-source.sh @@ -22,7 +22,7 @@ tar -zxvf hugegraph-*.tar.gz HTTPS_SERVER_DIR="hugegraph_https" mkdir ${HTTPS_SERVER_DIR} cp -r hugegraph-*/. ${HTTPS_SERVER_DIR} -cd hugegraph-* +cd "$(find hugegraph-* | head -1)" cp ../$TRAVIS_DIR/conf/* conf # start HugeGraphServer with http protocol echo -e "pa" | bin/init-store.sh || exit 1 diff --git a/pom.xml b/pom.xml index 65619002..6479edec 100644 --- a/pom.xml +++ b/pom.xml @@ -194,6 +194,13 @@ + + + + --pinentry-mode + loopback + +