From 9ac9d27f07e36731cde90f5223050251fe938c9d Mon Sep 17 00:00:00 2001 From: Andrea Cavalli Date: Wed, 3 Feb 2021 14:14:28 +0100 Subject: [PATCH] Publish to maven --- .github/workflows/maven-publish.yml | 47 +++++++++++++++++++++++++++++ pom.xml | 3 +- 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/maven-publish.yml diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml new file mode 100644 index 0000000..8eddb19 --- /dev/null +++ b/.github/workflows/maven-publish.yml @@ -0,0 +1,47 @@ +# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created +# For more information see: https://github.com/actions/setup-java#apache-maven-with-a-settings-path + +name: Maven Package + +on: + push: + pull_request: + schedule: + - cron: '0 0 * * 0' # weekly + +jobs: + build: + strategy: + matrix: + include: + - { os: ubuntu-20.04, arch: "linux/amd64" } + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + with: + submodules: "recursive" + - name: Setup variables + shell: bash + run: | + # ====== Variables + export REVISION=${{ github.run_number }} + + echo "REVISION=$REVISION" >> $GITHUB_ENV + - name: Set up JDK 15 + if: github.ref == 'refs/heads/master' + uses: actions/setup-java@v1 + with: + java-version: 15 + server-id: mchv-release-distribution + server-username: MAVEN_USERNAME + server-password: MAVEN_PASSWORD + - name: Deploy to Maven (Release) + if: github.ref == 'refs/heads/master' + shell: bash + run: | + echo "REVISION: $REVISION" + + mvn --batch-mode deploy + env: + MAVEN_USERNAME: ${{ secrets.MCHV_USERNAME }} + MAVEN_PASSWORD: ${{ secrets.MCHV_TOKEN }} diff --git a/pom.xml b/pom.xml index 2b424a7..1abce4f 100644 --- a/pom.xml +++ b/pom.xml @@ -7,11 +7,12 @@ it.cavallium dbengine - 2.0.1 + 3.0.${revision} jar UTF-8 + 0-SNAPSHOT