diff --git a/.github/workflows/ci-maven-common.yml b/.github/workflows/ci-maven-common.yml
index 338c0576..1d743bf6 100644
--- a/.github/workflows/ci-maven-common.yml
+++ b/.github/workflows/ci-maven-common.yml
@@ -22,3 +22,4 @@ jobs:
uses: ./.github/workflows/reusable-maven.yml
with:
path_to_package: common/org.eclipse.theia.cloud.common/
+ secrets: inherit
diff --git a/.github/workflows/ci-maven-conf.yml b/.github/workflows/ci-maven-conf.yml
index cc78e156..3596557a 100644
--- a/.github/workflows/ci-maven-conf.yml
+++ b/.github/workflows/ci-maven-conf.yml
@@ -22,3 +22,4 @@ jobs:
uses: ./.github/workflows/reusable-maven.yml
with:
path_to_package: common/maven-conf/
+ secrets: inherit
diff --git a/.github/workflows/ci-maven-operator.yml b/.github/workflows/ci-maven-operator.yml
index 07b7b21a..94fe211f 100644
--- a/.github/workflows/ci-maven-operator.yml
+++ b/.github/workflows/ci-maven-operator.yml
@@ -25,3 +25,4 @@ jobs:
with:
path_to_package: operator/org.eclipse.theia.cloud.operator/
dependencies: common/maven-conf/,common/org.eclipse.theia.cloud.common/
+ secrets: inherit
diff --git a/.github/workflows/ci-maven-service.yml b/.github/workflows/ci-maven-service.yml
index 92984a7e..67b13ea7 100644
--- a/.github/workflows/ci-maven-service.yml
+++ b/.github/workflows/ci-maven-service.yml
@@ -24,3 +24,4 @@ jobs:
with:
path_to_package: service/org.eclipse.theia.cloud.service/
dependencies: common/maven-conf/,common/org.eclipse.theia.cloud.common/
+ secrets: inherit
diff --git a/.github/workflows/reusable-maven.yml b/.github/workflows/reusable-maven.yml
index 2fbb03c1..d6f3bece 100644
--- a/.github/workflows/reusable-maven.yml
+++ b/.github/workflows/reusable-maven.yml
@@ -89,7 +89,7 @@ jobs:
cd -
done
- - name: Publish package
+ - name: Publish package to GitHub Packages
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')
@@ -98,3 +98,21 @@ jobs:
mvn --batch-mode deploy
env:
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
+ env:
+ GCP_SA_KEY: ${{ secrets.GCP_SA_KEY }}
diff --git a/java/common/maven-conf/pom.xml b/java/common/maven-conf/pom.xml
index de5abac7..ebbacace 100644
--- a/java/common/maven-conf/pom.xml
+++ b/java/common/maven-conf/pom.xml
@@ -27,12 +27,52 @@
1.1.2
-
-
- github
- GitHub Packages
- https://maven.pkg.github.com/eclipsesource/theia-cloud
-
-
+
+
+ github
+
+
+ github
+ GitHub Packages
+ https://maven.pkg.github.com/eclipsesource/theia-cloud
+
+
+
+ true
+
+
+
+ artifact-registry
+
+
+ artifact-registry
+ Google Artifact Registry
+ artifactregistry://europe-west3-maven.pkg.dev/kubernetes-238012/theia-cloud
+
+
+
+
+ artifact-registry
+ artifactregistry://europe-west3-maven.pkg.dev/kubernetes-238012/theia-cloud
+
+ true
+
+
+ true
+
+
+
+
+
+
+ com.google.cloud.artifactregistry
+ artifactregistry-maven-wagon
+ 2.2.0
+ true
+
+
+
+
+