Skip to content

Commit

Permalink
Update release configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
aalmiray committed Feb 12, 2024
1 parent a793af4 commit e096f8e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 66 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Expand Up @@ -30,10 +30,10 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 11
Expand Down
26 changes: 11 additions & 15 deletions .github/workflows/release.yml
Expand Up @@ -34,21 +34,16 @@ jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_DISTRO }}
cache: maven
server-id: central
server-username: MAVEN_USERNAME
server-password: MAVEN_CENTRAL_TOKEN
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE

- name: Set release version
id: version
Expand All @@ -73,27 +68,28 @@ jobs:
echo "NEXT_VERSION=$NEXT_VERSION" >> $GITHUB_ENV
echo "PLAIN_VERSION=$PLAIN_VERSION" >> $GITHUB_ENV
- name: Release to Maven Central
env:
MAVEN_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.SONATYPE_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
- name: Stage
run: |
export GPG_TTY=$(tty)
./mvnw -ntp -B --file pom.xml \
-Drepository.url=https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git \
-Dmaven.site.skip=true -Ppublication,stage
-Dmaven.site.skip=true -Drelease=true -Ppublication,stage
- name: Release to GitHub
- name: Release
env:
JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JRELEASER_BRANCH: ${{ env.BRANCH }}
JRELEASER_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.GPG_PUBLIC_KEY }}
JRELEASER_GPG_SECRET_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
JRELEASER_NEXUS2_MAVEN_CENTRAL_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
JRELEASER_NEXUS2_MAVEN_CENTRAL_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
run: |
./mvnw -ntp -B --file pom.xml -pl :moditect-parent -Pjreleaser jreleaser:release
- name: JReleaser output
if: always()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: jreleaser-release
path: |
Expand Down
55 changes: 6 additions & 49 deletions parent/pom.xml
Expand Up @@ -187,7 +187,7 @@
<plugin>
<groupId>org.jreleaser</groupId>
<artifactId>jreleaser-maven-plugin</artifactId>
<version>1.8.0</version>
<version>${version.jreleaser.plugin}</version>
<inherited>false</inherited>
<configuration>
<gitRootSearch>true</gitRootSearch>
Expand All @@ -212,7 +212,7 @@
<snapshotUrl>https://oss.sonatype.org/content/repositories/snapshots/</snapshotUrl>
<closeRepository>true</closeRepository>
<releaseRepository>true</releaseRepository>
<stagingRepositories>target/staging-deploy</stagingRepositories>
<stagingRepositories>${maven.multiModuleProjectDirectory}/target/staging-deploy</stagingRepositories>
</maven-central>
</nexus2>
</maven>
Expand All @@ -227,56 +227,13 @@
</issues>
<changelog>
<formatted>ALWAYS</formatted>
<format>- {{commitShortHash}} {{commitTitle}}</format>
<formatted>ALWAYS</formatted>
<preset>conventional-commits</preset>
<skipMergeCommits>true</skipMergeCommits>
<contributors>
<format>- {{contributorName}}</format>
<format>- {{contributorName}}{{#contributorUsernameAsLink}} ({{.}}){{/contributorUsernameAsLink}}</format>
</contributors>
<labelers>
<labeler>
<label>dependencies</label>
<title>Bump</title>
</labeler>
<labeler>
<label>issue</label>
<title>regex:.*#[0-9].*</title>
</labeler>
<labeler>
<label>merge_pull</label>
<title>Merge pull</title>
</labeler>
<labeler>
<label>merge_branch</label>
<title>Merge branch</title>
</labeler>
<labeler>
<label>task_prep</label>
<title>Preparing</title>
</labeler>
<labeler>
<label>task_rel</label>
<title>Releasing</title>
</labeler>
</labelers>
<categories>
<category>
<title>Merge</title>
<labels>merge_pull,merge_branch</labels>
</category>
<category>
<title>✅ Issues</title>
<labels>issue</labels>
</category>
<category>
<title>🧰 Tasks</title>
<labels>task_prep,task_rel</labels>
</category>
<category>
<title>⚙️ Dependencies</title>
<labels>dependencies</labels>
</category>
</categories>
<hide>
<categories>Merge</categories>
<contributors>GitHub,dependabot</contributors>
</hide>
</changelog>
Expand Down

0 comments on commit e096f8e

Please sign in to comment.