Skip to content
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
26 changes: 26 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,29 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

publish-snapshot:

name: Publish Snapshot
needs: [test, javadoc]
runs-on: ubuntu-latest
if: github.repository_owner == 'assertj' && github.event_name == 'push' && github.ref == 'refs/heads/main'

steps:
- uses: actions/checkout@v4
- name: Set up Maven Central
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '21'
server-id: central
server-username: MAVEN_CENTRAL_USERNAME
server-password: MAVEN_CENTRAL_TOKEN
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}

- name: Publish to Maven Central
run: ./mvnw $MAVEN_ARGS -DskipTests -Ppublish deploy
env:
MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
13 changes: 7 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ env:
MAVEN_ARGS: -B -V -ntp -e -Djansi.passthrough=true -Dstyle.color=always -Djacoco.skip=true

jobs:
release:

name: Release to Maven Central
publish-release:

name: Publish Release
runs-on: ubuntu-latest

steps:
Expand All @@ -20,8 +21,8 @@ jobs:
distribution: 'zulu'
java-version: '21'
server-id: ossrh
server-username: OSSRH_USERNAME
server-password: OSSRH_TOKEN
server-username: MAVEN_CENTRAL_USERNAME
server-password: MAVEN_CENTRAL_TOKEN
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}

- name: Publish to Maven Central
Expand All @@ -30,6 +31,6 @@ jobs:
git config user.email '${{ github.actor }}@users.noreply.github.com'
./mvnw $MAVEN_ARGS release:prepare release:perform -Dpassword=${{ secrets.GITHUB_TOKEN }}
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
4 changes: 1 addition & 3 deletions assertj-generator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.assertj</groupId>
<artifactId>assertj-generator-build</artifactId>
<version>3.0.0-M6-SNAPSHOT</version>
<version>3.0.0-SNAPSHOT</version>
</parent>

<artifactId>assertj-generator</artifactId>
Expand All @@ -17,8 +17,6 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- Needed to properly bring in the Maven dependencies, see http://maven.apache.org/surefire/maven-surefire-plugin/examples/class-loading.html -->
<surefire.useSystemClassLoader>false</surefire.useSystemClassLoader>
<!-- Dependency versions overriding -->
<junit-jupiter.version>5.11.1</junit-jupiter.version>
</properties>

<dependencyManagement>
Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</parent>

<artifactId>assertj-generator-build</artifactId>
<version>3.0.0-M6-SNAPSHOT</version>
<version>3.0.0-SNAPSHOT</version>
<packaging>pom</packaging>

<name>AssertJ Generator Build</name>
Expand All @@ -32,8 +32,8 @@
<build>
<plugins>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
Expand Down