Skip to content

Commit

Permalink
Merge pull request rockcrafters#31 from vpa1977/fix_samples
Browse files Browse the repository at this point in the history
fix: resolve failure to build samples
  • Loading branch information
vpa1977 authored Oct 16, 2024
2 parents dc069b9 + dd8fbeb commit 807b5d8
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 41 deletions.
14 changes: 2 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ jobs:

- name: Build and verify Maven sample projects
run: |
mvn install
mvn install -B
cd examples/maven
for x in $(find . -maxdepth 1 -type d -not -name '.' -print); do
(cd $x && mvn package)
(cd $x && mvn package -B)
done
build-maven:
Expand All @@ -69,11 +69,6 @@ jobs:
with: # running setup-java again overwrites the settings.xml
distribution: 'temurin'
java-version: '8'
server-id: central
server-username: MAVEN_USERNAME
server-password: MAVEN_CENTRAL_TOKEN
gpg-private-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE

- name: Setup LXD
uses: canonical/setup-lxd@main
Expand All @@ -89,11 +84,6 @@ jobs:
- name: Build and verify maven project
run: |
mvn -B install invoker:install invoker:run
env:
MAVEN_USERNAME: do-not-deploy
MAVEN_CENTRAL_TOKEN: do-not-deploy
MAVEN_GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_PASSPHRASE }}

build-gradle:
name: Build Gradle
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
- name: Publish to Maven central
id: deploy-maven
run: |
mvn deploy -B
mvn deploy -B -Prelease
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_CENTRAL_TOKEN_USERNAME }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN_PASSWORD }}
Expand Down
65 changes: 37 additions & 28 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,34 +48,43 @@
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.2.7</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
<configuration>
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.6.0</version>
<extensions>true</extensions>
<configuration>
<publishingServerId>central</publishingServerId>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.2.7</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
<configuration>
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.6.0</version>
<extensions>true</extensions>
<configuration>
<publishingServerId>central</publishingServerId>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

0 comments on commit 807b5d8

Please sign in to comment.