Skip to content

Commit 6b56937

Browse files
committed
ci: decouple making a release and publishing
Since it is not possible to pass environment variables to process spawned by the [semantic-release-exec-plugin](https://github.com/semantic-release/exec), move publishing artifacts into an seperate process that runs after a release is made. For more details regarding this issue, see [here](semantic-release/exec#160).
1 parent e32ca6b commit 6b56937

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.github/workflows/ci.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -94,18 +94,23 @@ jobs:
9494
run: npm ci
9595

9696
- name: Create a release
97-
run: npx semantic-release
9897
env:
9998
DEBUG: "semantic-release:*"
10099
GIT_AUTHOR_EMAIL: ${{ secrets.GIT_COMMITTER_EMAIL }}
101100
GIT_AUTHOR_NAME: ${{ secrets.GIT_COMMITTER_NAME }}
102101
GIT_COMMITTER_EMAIL: ${{ secrets.GIT_COMMITTER_EMAIL }}
103102
GIT_COMMITTER_NAME: ${{ secrets.GIT_COMMITTER_NAME }}
104103
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
104+
run: npx semantic-release
105+
106+
- name: Publish to all repositories
107+
env:
108+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
105109
ORG_GRADLE_PROJECT_github.token: ${{ secrets.GH_TOKEN }}
106110
ORG_GRADLE_PROJECT_github.username: kennedykori
107111
ORG_GRADLE_PROJECT_signing.inMemory: "true"
108112
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GRADLE_SIGNING_KEY }}
109113
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GRADLE_SIGNING_PASSWORD }}
110114
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }}
111115
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }}
116+
run: ./gradlew publish findSonatypeStagingRepository closeAndReleaseSonatypeStagingRepository

.releaserc.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ plugins:
5050
- - "@semantic-release/changelog"
5151
- changelogFile: "docs/CHANGELOG.md"
5252
- - "@semantic-release/exec"
53-
- publishCmd: "./gradlew publish findSonatypeStagingRepository closeAndReleaseSonatypeStagingRepository"
53+
- publishCmd: "./gradlew jar javadocJar sourcesJar"
5454
- - "@semantic-release/git"
5555
- assets:
5656
- docs/CHANGELOG.md

0 commit comments

Comments
 (0)