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 maven publishing for release versions #331

Merged
merged 1 commit into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
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
13 changes: 8 additions & 5 deletions .github/workflows/reusable-maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v4

- id: version_check
- name: Run Version Check
id: version_check
run: |
cd ${{ inputs.path_to_package }}
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
Expand All @@ -77,9 +78,11 @@ jobs:

- 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 != '' }} &&
(
(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: |
IFS=',' read -r -a dirs <<< "${{ inputs.dependencies }}"
for dir in "${dirs[@]}"
Expand All @@ -105,7 +108,7 @@ jobs:
(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 }}'
credentials_json: "${{ secrets.GCP_SA_KEY }}"

- name: Publish package to Google Artifact Registry
if: |
Expand Down
5 changes: 5 additions & 0 deletions java/common/maven-conf/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@
<profile>
<id>artifact-registry</id>
<distributionManagement>
<repository>
<id>artifact-registry</id>
<name>Google Artifact Registry</name>
<url>artifactregistry://europe-west3-maven.pkg.dev/kubernetes-238012/theia-cloud</url>
</repository>
<snapshotRepository>
<id>artifact-registry</id>
<name>Google Artifact Registry</name>
Expand Down