Skip to content
This repository was archived by the owner on Oct 18, 2024. It is now read-only.

Commit 3e40d0b

Browse files
committed
chore(workflow): close and release repository in another job step
1 parent 7da8723 commit 3e40d0b

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

.github/workflows/build.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,22 @@ jobs:
155155
${{ runner.os }}-gradle-
156156
157157
- name: Publish release
158-
run: ./gradlew nyxMake nyxMark nyxPublish release closeAndReleaseRepository --stacktrace
158+
id: publish_release
159+
run: |
160+
./gradlew nyxMake nyxMark nyxPublish release --stacktrace
161+
echo ::set-output name=exit_code::$?
162+
env:
163+
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MVN_USERNAME }}
164+
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MVN_PASSWORD }}
165+
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.MVN_SIGNING_KEY }}
166+
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.MVN_SIGNING_KEY_ID }}
167+
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.MVN_SIGNING_KEY_PASSWORD }}
168+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
169+
PublishToMaven: ${{ github.ref == 'refs/heads/main' }}
170+
171+
- name: Close and release
172+
if: steps.publish_release.outputs.exit_code == 0
173+
run: ./gradlew closeAndReleaseRepository --stacktrace
159174
env:
160175
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MVN_USERNAME }}
161176
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MVN_PASSWORD }}

0 commit comments

Comments
 (0)