Skip to content

Commit c0ff093

Browse files
authored
chore: update release process (#396)
1 parent c1f3e63 commit c0ff093

File tree

6 files changed

+35
-12
lines changed

6 files changed

+35
-12
lines changed

.releaserc

+2-3
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,12 @@
5353
["@semantic-release/exec", {
5454
"prepareCmd": "mvn versions:set -DnewVersion=${nextRelease.version} \
5555
-DautoVersionSubmodules=true && find README.md -type f \
56-
-exec sed -i '' 's/<version>.*<\\/version>/<version>${nextRelease.version}<\\/version>/g' {} \\;"
56+
-exec sed -i 's/<version>.*<\\/version>/<version>${nextRelease.version}<\\/version>/g' {} \\;"
5757
}],
5858
["@semantic-release/git", {
5959
"assets": ["./CHANGELOG.md", "./pom.xml", "./README.md"],
60-
"message": "AWS Encryption SDK ${nextRelease.version} Release \n\n${nextRelease.notes}"
60+
"message": "AWS Encryption SDK ${nextRelease.version} Release -- $(date +%Y-%m-%d) \n\n${nextRelease.notes}"
6161
}],
62-
#@semantic-release/github"
6362
],
6463
"repositoryUrl": "https://github.com/aws/aws-encryption-sdk-java",
6564
}

codebuild/release/artifact-hunt.yml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
## Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
2+
## SPDX-License-Identifier: Apache-2.0
3+
4+
version: 0.2
5+
6+
env:
7+
variables:
8+
BRANCH: "master"
9+
10+
phases:
11+
install:
12+
runtime-versions:
13+
java: corretto11
14+
pre_build:
15+
commands:
16+
- git checkout $BRANCH
17+
- export VERSION=$(grep version pom.xml | head -n 1 | sed -n 's/[ \t]*<version>\(.*\)<\/version>/\1/p')
18+
build:
19+
commands:
20+
- ./look_4_version.sh $VERSION

codebuild/release/release-prod.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,9 @@ env:
1313
phases:
1414
install:
1515
runtime-versions:
16-
java: openjdk11
16+
java: corretto11
1717
pre_build:
1818
commands:
19-
- export VERSION=$(grep version pom.xml | head -n 1 | sed -n 's/[ \t]*<version>\(.*\)<\/version>/\1/p')
2019
- export SETTINGS_FILE=$(pwd)/codebuild/release/settings.xml
2120
- aws secretsmanager get-secret-value --region us-west-2 --secret-id Maven-GPG-Keys --query SecretBinary --output text | base64 -d > ~/mvn_gpg.tgz
2221
- tar -xvf ~/mvn_gpg.tgz -C ~
@@ -35,4 +34,3 @@ phases:
3534
-Dsonatype.password="$SONA_PASSWORD" \
3635
--no-transfer-progress \
3736
-s $SETTINGS_FILE
38-
- ./look_4_version.sh $VERSION

codebuild/release/release.yml

+10-4
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,16 @@ batch:
7070
- version
7171
buildspec: codebuild/release/release-prod.yml
7272

73+
# Search for published Artifact
74+
- identifier: artifact_hunt
75+
depend-on:
76+
- publish
77+
buildspec: codebuild/release/artifact-hunt.yml
78+
7379
# Validate Maven Central with supported JDK and Corretto
7480
- identifier: validate_prod_release_openjdk8
7581
depend-on:
76-
- publish
82+
- artifact_hunt
7783
buildspec: codebuild/release/validate-prod.yml
7884
env:
7985
variables:
@@ -83,7 +89,7 @@ batch:
8389

8490
- identifier: validate_prod_release_openjdk11
8591
depend-on:
86-
- publish
92+
- artifact_hunt
8793
buildspec: codebuild/release/validate-prod.yml
8894
env:
8995
variables:
@@ -93,7 +99,7 @@ batch:
9399

94100
- identifier: validate_prod_release_corretto8
95101
depend-on:
96-
- publish
102+
- artifact_hunt
97103
buildspec: codebuild/release/validate-prod.yml
98104
env:
99105
variables:
@@ -103,7 +109,7 @@ batch:
103109

104110
- identifier: validate_prod_release_corretto11
105111
depend-on:
106-
- publish
112+
- artifact_hunt
107113
buildspec: codebuild/release/validate-prod.yml
108114
env:
109115
variables:

codebuild/release/upload_artifacts.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ phases:
3737
mvn org.apache.maven.plugins:maven-dependency-plugin:3.1.2:get \
3838
-DrepoUrl=https://aws.oss.sonatype.org \
3939
-Dartifact=com.amazonaws:aws-encryption-sdk-java:${VERSION}:jar:javadoc
40-
- gh release upload v${VERSION} ~/.m2/repository/com/amazonaws/aws-encryption-sdk-java/${VERSION}/*.jar
40+
- gh release create v${VERSION} ~/.m2/repository/com/amazonaws/aws-encryption-sdk-java/${VERSION}/*.jar -d -F CHANGELOG.md -t "AWS Encryption SDK ${VERSION} Release -- $(date +%Y-%m-%d)"

codebuild/release/version.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ phases:
2626
- git checkout $BRANCH
2727
build:
2828
commands:
29-
- npx semantic-release --no-ci
29+
- npx semantic-release --branches $BRANCH --no-ci

0 commit comments

Comments
 (0)