Skip to content

Commit

Permalink
Test publish on PR
Browse files Browse the repository at this point in the history
  • Loading branch information
sgraband committed Jul 9, 2024
1 parent f59bf6d commit cef44be
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions .github/workflows/reusable-maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ jobs:
publish:
runs-on: ubuntu-latest
if: github.event_name == 'push' || github.event_name == 'release'
steps:
- name: Checkout Repository
uses: actions/checkout@v4
Expand All @@ -64,19 +63,14 @@ jobs:
fi
- name: Set up JDK 17
if: |
(github.event_name == 'push' && steps.version_check.outputs.is_snapshot_version == 'true') ||
(github.event_name == 'release' && steps.version_check.outputs.is_snapshot_version == 'false')
uses: actions/setup-java@v4
with:
java-version: "17"
distribution: "temurin"

- name: Build dependencies
if: |
${{ inputs.dependencies != '' }} &&
(github.event_name == 'push' && steps.version_check.outputs.is_snapshot_version == 'true') ||
(github.event_name == 'release' && steps.version_check.outputs.is_snapshot_version == 'false')
${{ inputs.dependencies != '' }}
run: |
IFS=',' read -r -a dirs <<< "${{ inputs.dependencies }}"
for dir in "${dirs[@]}"
Expand All @@ -97,17 +91,11 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Authenticate to Google Cloud
if: |
(github.event_name == 'push' && steps.version_check.outputs.is_snapshot_version == 'true') ||
(github.event_name == 'release' && steps.version_check.outputs.is_snapshot_version == 'false')
uses: google-github-actions/auth@v2
with:
credentials_json: '${{ secrets.GCP_SA_KEY }}'

- name: Publish package to Google Artifact Registry
if: |
(github.event_name == 'push' && steps.version_check.outputs.is_snapshot_version == 'true') ||
(github.event_name == 'release' && steps.version_check.outputs.is_snapshot_version == 'false')
run: |
cd ${{ inputs.path_to_package }}
mvn --batch-mode deploy -Partifact-registry
Expand Down

0 comments on commit cef44be

Please sign in to comment.