Skip to content

Commit

Permalink
Use execution.id for maven deploy from CI
Browse files Browse the repository at this point in the history
  • Loading branch information
jann0k committed Dec 6, 2024
1 parent 2385022 commit facc137
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 28 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:

- name: Publish to GitHub Packages Apache Maven
run: |
mvn deploy -Pdeploy-openapi-cdoc2-key-shares -s $GITHUB_WORKSPACE/settings.xml
mvn deploy -Pdeploy-openapi-cdoc2-key-capsules -s $GITHUB_WORKSPACE/settings.xml
mvn deploy -Dexecution.id=deploy-openapi-cdoc2-key-shares -s $GITHUB_WORKSPACE/settings.xml
mvn deploy -Dexecution.id=deploy-openapi-cdoc2-key-capsules -s $GITHUB_WORKSPACE/settings.xml
env:
GITHUB_TOKEN: ${{ github.token }}
27 changes: 1 addition & 26 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -118,31 +118,6 @@

</executions>
</plugin>
<!-- if exact RELEASE version of module already exists, -->
<!-- then skip deployment by setting maven.deploy.skip=true property for that module -->
<!-- GitHub doesn't allow overwriting existing RELEASE modules and deploy will fail with HTTP 409 -->
<plugin>
<groupId>org.honton.chas</groupId>
<artifactId>exists-maven-plugin</artifactId>
<version>0.13.0</version>
<executions>
<execution>
<phase>install</phase>
<goals>
<goal>remote</goal>
</goals>
<configuration>
<!-- run only if deploy goal is specified in maven command line -->
<requireGoal>deploy</requireGoal>
</configuration>
</execution>
</executions>
<configuration>
<failIfNotMatch>false</failIfNotMatch>
<userProperty>true</userProperty>
<!--skip>true</skip-->
</configuration>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>3.1.2</version>
Expand Down Expand Up @@ -193,7 +168,7 @@
<goal>deploy-file</goal>
</goals>
<configuration>
<skip>false</skip>
<skip>true</skip>
<file>${project.basedir}/cdoc2-key-capsules-openapi.yaml</file>
<groupId>ee.cyber.cdoc2.openapi</groupId>
<artifactId>cdoc2-key-capsules-openapi</artifactId>
Expand Down

0 comments on commit facc137

Please sign in to comment.