Skip to content
This repository was archived by the owner on Dec 19, 2023. It is now read-only.

Commit 62012d5

Browse files
committed
ci: configure release build
1 parent ba7a197 commit 62012d5

File tree

5 files changed

+19
-16
lines changed

5 files changed

+19
-16
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
env:
6868
OSS_USER_TOKEN_KEY: ${{ secrets.OSS_USER_TOKEN_KEY }}
6969
OSS_USER_TOKEN_PASS: ${{ secrets.OSS_USER_TOKEN_PASS }}
70-
run: ./gradlew publish
70+
run: ./gradlew clean build publish
7171
sonar:
7272
name: Sonar analysis
7373
needs: validation

.github/workflows/release.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,19 @@ jobs:
5858
${{ runner.os }}-${{ env.java-version }}-gradle-
5959
- name: Make gradlew executable
6060
run: chmod +x ./gradlew
61+
- name: Prepare environment
62+
env:
63+
GPG_KEY_CONTENTS: ${{ secrets.GPG_KEY_CONTENTS }}
64+
SIGNING_SECRET_KEY_RING_FILE: ${{ secrets.GPG_SIGNING_SECRET_KEY_RING_FILE }}
65+
run: |
66+
git fetch --unshallow
67+
sudo bash -c "echo '$GPG_KEY_CONTENTS' | base64 -d > '$SIGNING_SECRET_KEY_RING_FILE'"
6168
- name: Publish release
6269
env:
63-
BINTRAY_USER: ${{ secrets.BINTRAY_USER }}
64-
BINTRAY_PASS: ${{ secrets.BINTRAY_PASSWORD }}
70+
SIGNING_KEY_ID: ${{ secrets.GPG_SIGNING_KEY_ID }}
71+
SIGNING_PASSWORD: ${{ secrets.GPG_SIGNING_PASSWORD }}
72+
SIGNING_SECRET_KEY_RING_FILE: ${{ secrets.GPG_SIGNING_SECRET_KEY_RING_FILE }}
6573
OSS_USER_TOKEN_KEY: ${{ secrets.OSS_USER_TOKEN_KEY }}
6674
OSS_USER_TOKEN_PASS: ${{ secrets.OSS_USER_TOKEN_PASS }}
67-
run: bash github-build.sh
75+
# run: bash github-build.sh
76+
run: ./gradlew clean build publish

build.gradle

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ subprojects {
4747
}
4848
apply plugin: 'maven-publish'
4949
apply plugin: 'signing'
50-
apply plugin: 'com.jfrog.artifactory'
5150

5251
group "$PROJECT_GROUP"
5352

@@ -134,15 +133,10 @@ subprojects {
134133
}
135134
}
136135

137-
signing {
138-
// useInMemoryPgpKeys(System.env.GPG_SIGNING_KEY, System.env.GPG_SIGNING_PASSWORD)
139-
required {
140-
// signing is required if this is a release version and the artifacts are to be published
141-
!version.toString().endsWith('-SNAPSHOT') && tasks.withType(PublishToMavenRepository).find {
142-
gradle.taskGraph.hasTask it
143-
}
136+
if (!version.toString().endsWith('-SNAPSHOT')) {
137+
signing {
138+
sign publishing.publications
144139
}
145-
sign publishing.publications
146140
}
147141

148142
publishing {

github-build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ commitNextVersion() {
4242
git config --global user.email "[email protected]"
4343
git config --global user.name "GitHub Actions"
4444

45-
echo "Deploying release to Bintray"
45+
echo "Deploying release to Sonatype"
4646
removeSnapshots
4747

48-
./gradlew clean assemble && ./gradlew bintrayUpload -x check --info
48+
./gradlew clean build publish
4949

5050
commitRelease
5151
bumpVersion

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
1717
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1818
#
19-
version=11.1.0-SNAPSHOT
19+
version=11.1.0
2020
### Project Metadata
2121
PROJECT_GROUP=com.graphql-java-kickstart
2222
PROJECT_NAME=graphql-spring-boot

0 commit comments

Comments
 (0)