Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ci): fix datahub jar publish action #9

Merged
merged 1 commit into from
Feb 8, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 9 additions & 13 deletions .github/workflows/publish-datahub-jars.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
name: Publish Datahub Client

on:
workflow_run:
workflows: ["build & test"]
types:
- completed

release:
types: [published, edited]

Expand All @@ -18,18 +13,19 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
outputs:
publish-enabled: ${{ steps.publish-enabled.outputs.defined }}
publish-enabled: ${{ steps.publish-enabled.outputs.publish }}
steps:
- id: publish-enabled
if: "${{ secrets.SIGNING_KEY != '' }}"
run: echo "::set-output name=defined::true"
env:
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
run: |
echo "Enable publish: ${{ env.SIGNING_KEY != '' }}"
echo "::set-output name=publish::${{ env.SIGNING_KEY != '' }}"

publish:
runs-on: ubuntu-latest
needs: [check-secret]
if: needs.check-secret.outputs.publish-enabled == 'true'
if: ${{ needs.publish-enabled.outputs.publish == 'true' }}
steps:
- uses: actions/checkout@v2
with:
Expand All @@ -56,8 +52,8 @@ jobs:
run: |
echo signingKey=$SIGNING_KEY >> gradle.properties
./gradlew :metadata-integration:java:datahub-client:printVersion
./gradlew :metadata-integration:java:datahub-client:publishToMavenLocal
#./gradlew :metadata-integration:java:datahub-client:closeAndReleaseRepository --info
./gradlew :metadata-integration:java:datahub-client:publish
./gradlew :metadata-integration:java:datahub-client:closeAndReleaseRepository --info
- name: publish datahub-spark jar
env:
RELEASE_USERNAME: ${{ secrets.RELEASE_USERNAME }}
Expand All @@ -69,5 +65,5 @@ jobs:
run: |
echo signingKey=$SIGNING_KEY >> gradle.properties
./gradlew :metadata-integration:java:spark-lineage:printVersion
./gradlew :metadata-integration:java:spark-lineage:publishToMavenLocal
#./gradlew :metadata-integration:java:datahub-client:closeAndReleaseRepository --info
./gradlew :metadata-integration:java:spark-lineage:publish
./gradlew :metadata-integration:java:datahub-client:closeAndReleaseRepository --info