-
Notifications
You must be signed in to change notification settings - Fork 209
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d37b6a7
commit 422b920
Showing
1 changed file
with
38 additions
and
23 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 |
---|---|---|
|
@@ -30,10 +30,6 @@ jobs: | |
DAPR_INSTALL_URL: https://raw.githubusercontent.com/dapr/cli/v1.3.0-rc.1/install/install.sh | ||
DAPR_CLI_REF: | ||
DAPR_REF: | ||
OSSRH_USER_TOKEN: ${{ secrets.OSSRH_USER_TOKEN }} | ||
OSSRH_PWD_TOKEN: ${{ secrets.OSSRH_PWD_TOKEN }} | ||
GPG_KEY: ${{ secrets.GPG_KEY }} | ||
GPG_PWD: ${{ secrets.GPG_PWD }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up OpenJDK ${{ env.JDK_VER }} | ||
|
@@ -117,22 +113,41 @@ jobs: | |
with: | ||
name: report-dapr-java-sdk-actors | ||
path: sdk-actors/target/jacoco-report/ | ||
- name: Get pom parent version | ||
run: | | ||
PARENT_VERSION=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec) | ||
echo "PARENT_VERSION=$PARENT_VERSION" >> $GITHUB_ENV | ||
- name: Is SNAPSHOT release ? | ||
if: contains(github.ref, 'master') && contains(env.PARENT_VERSION, '-SNAPSHOT') | ||
run: | | ||
echo "DEPLOY_OSSRH=true" >> $GITHUB_ENV | ||
- name: Is Release or RC version ? | ||
if: startswith(github.ref, 'refs/tags/v') && !contains(env.PARENT_VERSION, '-SNAPSHOT') | ||
run: | | ||
echo "DEPLOY_OSSRH=true" >> $GITHUB_ENV | ||
- name: Publish to ossrh | ||
if: env.DEPLOY_OSSRH == 'true' | ||
run: | | ||
echo ${{ secrets.GPG_PRIVATE_KEY }} | base64 -d > private-key.gpg | ||
export GPG_TTY=$(tty) | ||
gpg --batch --import private-key.gpg | ||
mvn -V -B -Dgpg.skip=false -s settings.xml deploy -pl \!examples | ||
publish: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
env: | ||
JDK_VER: 11 | ||
OSSRH_USER_TOKEN: ${{ secrets.OSSRH_USER_TOKEN }} | ||
OSSRH_PWD_TOKEN: ${{ secrets.OSSRH_PWD_TOKEN }} | ||
GPG_KEY: ${{ secrets.GPG_KEY }} | ||
GPG_PWD: ${{ secrets.GPG_PWD }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up OpenJDK ${{ env.JDK_VER }} | ||
uses: actions/[email protected] | ||
with: | ||
distribution: 'adopt' | ||
java-version: ${{ env.JDK_VER }} | ||
- name: Get pom parent version | ||
run: | | ||
PARENT_VERSION=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec) | ||
echo "PARENT_VERSION=$PARENT_VERSION" >> $GITHUB_ENV | ||
- name: Is SNAPSHOT release ? | ||
if: contains(github.ref, 'master') && contains(env.PARENT_VERSION, '-SNAPSHOT') | ||
run: | | ||
echo "DEPLOY_OSSRH=true" >> $GITHUB_ENV | ||
- name: Is Release or RC version ? | ||
if: startswith(github.ref, 'refs/tags/v') && !contains(env.PARENT_VERSION, '-SNAPSHOT') | ||
run: | | ||
echo "DEPLOY_OSSRH=true" >> $GITHUB_ENV | ||
- name: Install jars | ||
if: env.DEPLOY_OSSRH == 'true' | ||
run: mvn clean install -q | ||
- name: Publish to ossrh | ||
if: env.DEPLOY_OSSRH == 'true' | ||
run: | | ||
echo ${{ secrets.GPG_PRIVATE_KEY }} | base64 -d > private-key.gpg | ||
export GPG_TTY=$(tty) | ||
gpg --batch --import private-key.gpg | ||
mvn -V -B -Dgpg.skip=false -s settings.xml deploy -pl \!examples |