Skip to content

Commit

Permalink
fix: introduce parent release package (#52)
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastian Becker <[email protected]>
  • Loading branch information
sbckr authored Jul 26, 2023
1 parent 1f35ca2 commit daa5a69
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 7 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/java.publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ name: Publish and Release Java
on:
push:
tags:
- "parent-v[0-9]+.[0-9]+.[0-9]+"
- "common-v[0-9]+.[0-9]+.[0-9]+"
- "java-client-v[0-9]+.[0-9]+.[0-9]+"
- "service-v[0-9]+.[0-9]+.[0-9]+"
Expand All @@ -17,14 +18,23 @@ jobs:
prepare:
runs-on: ubuntu-22.04
outputs:
MODULE: "${GITHUB_REPOSITORY#*/}-${{ steps.package.outputs.name }}"
MODULE: "${{ steps.module.outputs.identifier }}"
VERSION: "${{ steps.release.outputs.version }}"
steps:
- name: Get Release Package Name
id: package
run: |
echo ::set-output name=name::\
$(echo "${GITHUB_REPOSITORY#*/}-${GITHUB_REF_NAME}" | sed -E 's/-v[0-9]+\.[0-9]+\.[0-9]+//')
$(echo ${GITHUB_REF_NAME} | sed -E 's/-v[0-9]+\.[0-9]+\.[0-9]+//')
- name: Get Module Identifier
id: module
run: |
if [ "${{ steps.package.outputs.name }}" = "parent" ]; then
module="."
else
module=${GITHUB_REPOSITORY#*/}-${{ steps.package.outputs.name }}
fi
echo ::set-output name=identifier::${module}
- name: Checkout repository
uses: actions/checkout@v2
- name: Get Release Version
Expand Down
1 change: 1 addition & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
".": "0.1.0",
"amphora-common": "0.1.0",
"amphora-java-client": "0.1.0",
"amphora-service": "0.1.0",
Expand Down
2 changes: 1 addition & 1 deletion 3RD-PARTY-LICENSES/module.name
Original file line number Diff line number Diff line change
@@ -1 +1 @@
amphora
amphora-parent
2 changes: 1 addition & 1 deletion amphora-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<version>0.1.0</version>
<parent>
<groupId>io.carbynestack</groupId>
<artifactId>amphora</artifactId>
<artifactId>amphora-parent</artifactId>
<version>0.1.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
Expand Down
2 changes: 1 addition & 1 deletion amphora-java-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<version>0.1.0</version>
<parent>
<groupId>io.carbynestack</groupId>
<artifactId>amphora</artifactId>
<artifactId>amphora-parent</artifactId>
<version>0.1.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
Expand Down
2 changes: 1 addition & 1 deletion amphora-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<version>0.1.0</version>
<parent>
<groupId>io.carbynestack</groupId>
<artifactId>amphora</artifactId>
<artifactId>amphora-parent</artifactId>
<version>0.1.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>amphora</artifactId>
<artifactId>amphora-parent</artifactId>
<groupId>io.carbynestack</groupId>
<version>0.1.0</version>
<packaging>pom</packaging>
Expand Down
4 changes: 4 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
"pull-request-header": ":package: Staging a new release",
"skip-snapshot": true,
"packages": {
".": {
"package-name": "parent",
"release-type": "maven"
},
"amphora-common": {
"package-name": "common",
"release-type": "maven"
Expand Down

0 comments on commit daa5a69

Please sign in to comment.