-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
modify pom to support auto deploy workflow (#21)
* modify pom to support auto deploy workflow * update secrets * fix yml syntax
- Loading branch information
Showing
3 changed files
with
182 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# This workflow will build a Java project with Maven | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven | ||
|
||
name: Deploy Spark Connector release version to Maven Central Repository | ||
|
||
on: | ||
release: | ||
types: published | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-18.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 1.8 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
|
||
- name: Cache the Maven packages to speed up build | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: ${{ runner.os }}-maven- | ||
|
||
- name: Install nebula-graph | ||
run: | | ||
mkdir tmp | ||
pushd tmp | ||
git clone https://github.com/vesoft-inc/nebula-docker-compose.git | ||
pushd nebula-docker-compose/ | ||
cp ../../nebula-spark-connector/src/test/resources/docker-compose.yaml . | ||
docker-compose up -d | ||
sleep 10 | ||
popd | ||
popd | ||
# deploy nebula-spark-connector after nebula-exchange, the parent artifactId nebula-spark cannot be overwrite. | ||
- name: enter the nebula-spark-connector directory | ||
run: pushd nebula-spark-connector | ||
|
||
- name: Deploy release to Maven | ||
uses: samuelmeuli/action-maven-publish@v1 | ||
with: | ||
gpg_private_key: ${{ secrets.JAVA_GPG_PRIVATE_KEY }} | ||
gpg_passphrase: ${{ secrets.JAVA_GPG_PASSPHRASE }} | ||
nexus_username: ${{ secrets.OSSRH_USERNAME }} | ||
nexus_password: ${{ secrets.OSSRH_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# This workflow will build a Java project with Maven | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven | ||
|
||
name: Java CI with Maven | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
schedule: | ||
- cron: '0 6 * * *' | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 1.8 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
|
||
- name: Cache the Maven packages to speed up build | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: ${{ runner.os }}-maven- | ||
|
||
- name: Install nebula-graph | ||
run: | | ||
mkdir tmp | ||
pushd tmp | ||
git clone https://github.com/vesoft-inc/nebula-docker-compose.git | ||
pushd nebula-docker-compose/ | ||
cp ../../nebula-spark-connector/src/test/resources/docker-compose.yaml . | ||
docker-compose up -d | ||
sleep 10 | ||
popd | ||
popd | ||
# deploy nebula-spark-connector after nebula-exchange, the parent artifactId nebula-spark cannot be overwrite. | ||
- name: enter the nebula-spark-connector directory | ||
run: pushd nebula-spark-connector | ||
|
||
- name: Deploy SNAPSHOT to Sonatype | ||
uses: samuelmeuli/action-maven-publish@v1 | ||
with: | ||
gpg_private_key: ${{ secrets.JAVA_GPG_PRIVATE_KEY }} | ||
gpg_passphrase: ${{ secrets.JAVA_GPG_PASSPHRASE }} | ||
nexus_username: ${{ secrets.OSSRH_USERNAME }} | ||
nexus_password: ${{ secrets.OSSRH_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters