Skip to content

Commit

Permalink
ci: publish & close and release to Sonatype seperately
Browse files Browse the repository at this point in the history
  • Loading branch information
kennedykori committed Jan 23, 2024
1 parent 969299c commit e6a64a5
Showing 1 changed file with 22 additions and 41 deletions.
63 changes: 22 additions & 41 deletions .releaserc.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,20 @@
---

branches:
- main
- name: develop
channel: dev
prerelease: dev
plugins:
- "@semantic-release/commit-analyzer"
- - "@semantic-release/release-notes-generator"
- '@semantic-release/commit-analyzer'
- - '@semantic-release/release-notes-generator'
- linkCompare: true
linkReferences: true
writerOpts:
commitGroupsSort:
- type
- title
commitSort:
- scope
- subject
commitGroupsSort: [ type, title ]
commitSort: [ scope, subject ]
- - semantic-release-replace-plugin
- replacements:
- countMatches: true
files:
- gradle.properties
files: [ gradle.properties ]
from: version=.*
to: version=${nextRelease.version}
results:
Expand All @@ -30,55 +23,43 @@ plugins:
numMatches: 1
numReplacements: 1
- countMatches: true
files:
- README.md
files: [ README.md ]
from:
- "<version>.*</version>"
- <version>.*</version>
- "'io.github.kennedykori:utils:.*'"
- '"io.github.kennedykori:utils:.*"'
- 'rev=".*"'
- rev=".*"
to:
- "<version>${nextRelease.version}</version>"
- <version>${nextRelease.version}</version>
- "'io.github.kennedykori:utils:${nextRelease.version}'"
- '"io.github.kennedykori:utils:${nextRelease.version}"'
- 'rev="${nextRelease.version}"'
- rev="${nextRelease.version}"
results:
- file: README.md
hasChanged: true
numMatches: 4
numReplacements: 4
- - "@semantic-release/changelog"
- changelogFile: "docs/CHANGELOG.md"
- - "@semantic-release/exec"
- publishCmd: "
export GITHUB_TOKEN='${process.env.GITHUB_TOKEN}';
export ORG_GRADLE_PROJECT_signingKey='${process.env.GRADLE_SIGNING_KEY}';
export ORG_GRADLE_PROJECT_signingPassword='${process.env.GRADLE_SIGNING_PASSWORD}';
export ORG_GRADLE_PROJECT_sonatypePassword='${process.env.GRADLE_SONATYPE_PASSWORD}';
export ORG_GRADLE_PROJECT_sonatypeUsername='${process.env.GRADLE_SONATYPE_USERNAME}';
./gradlew -Pgithub.username=kennedykori -Psigning.inMemory=true
publish findSonatypeStagingRepository closeAndReleaseSonatypeStagingRepository"
- - "@semantic-release/git"
- assets:
- docs/CHANGELOG.md
- gradle.properties
- README.md
message: "release: ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
- - "@semantic-release/github"
- - '@semantic-release/changelog'
- changelogFile: docs/CHANGELOG.md
- - '@semantic-release/exec'
- publishCmd: " export GITHUB_TOKEN='${process.env.GITHUB_TOKEN}'; export ORG_GRADLE_PROJECT_signingKey='${process.env.GRADLE_SIGNING_KEY}'; export ORG_GRADLE_PROJECT_signingPassword='${process.env.GRADLE_SIGNING_PASSWORD}'; export ORG_GRADLE_PROJECT_sonatypePassword='${process.env.GRADLE_SONATYPE_PASSWORD}'; export ORG_GRADLE_PROJECT_sonatypeUsername='${process.env.GRADLE_SONATYPE_USERNAME}'; ./gradlew -Pgithub.username=kennedykori -Psigning.inMemory=true publish && ./gradlew -Pgithub.username=kennedykori -Psigning.inMemory=true findSonatypeStagingRepository closeAndReleaseSonatypeStagingRepository"
- - '@semantic-release/git'
- assets: [ docs/CHANGELOG.md, gradle.properties, README.md ]
message: "release: ${nextRelease.version} [skip ci]
${nextRelease.notes}"
- - '@semantic-release/github'
- assets:
- path: build/libs/*.jar
tagFormat: v${version}

# ------------------------------------------------------------------------------
# GLOBAL PLUGIN OPTIONS
# See: https://github.com/semantic-release/semantic-release/blob/master/docs/usage/plugins
# .md#plugin-options-configuration
# ------------------------------------------------------------------------------
parserOptions:
noteKeywords:
- BREAKING CHANGE
- BREAKING CHANGES
- BREAKING
noteKeywords: [ BREAKING CHANGE, BREAKING CHANGES, BREAKING ]
preset: conventionalcommits
presetConfig:
types:
Expand Down

0 comments on commit e6a64a5

Please sign in to comment.