Skip to content

Commit a74bd7f

Browse files
committed
Update RELEASING documentation
1 parent 1a545d9 commit a74bd7f

File tree

1 file changed

+1
-214
lines changed

1 file changed

+1
-214
lines changed

RELEASING.md

+1-214
Original file line numberDiff line numberDiff line change
@@ -1,216 +1,3 @@
11
# Releasing
22

3-
### Linux
4-
5-
- Ensure java version is greater than or equal to 11
6-
```bash
7-
java --version
8-
```
9-
10-
- Set version variable in terminal shell
11-
```bash
12-
VERSION_NAME="<version name>"
13-
```
14-
15-
- Create a release branch
16-
```bash
17-
git checkout master
18-
git pull
19-
git checkout -b release_"$VERSION_NAME"
20-
```
21-
22-
- Update `VERSION_NAME` (remove `-SNAPSHOT`) and `VERSION_CODE` in root project's `gradle.properties` file
23-
24-
- Update `version` in project's `README.md` documentation
25-
26-
- Update the Kotlin Version compatibility matrix in project's `README.md` documentation
27-
28-
- Update `CHANGELOG.md`
29-
30-
- Commit Changes
31-
```bash
32-
git add --all
33-
git commit -S -m "Prepare $VERSION_NAME release"
34-
git tag -s "$VERSION_NAME" -m "Release v$VERSION_NAME"
35-
```
36-
37-
- Make sure you have valid credentials in `~/.gradle/gradle.properties`
38-
```
39-
mavenCentralUsername=MyUserName
40-
mavenCentralPassword=MyPassword
41-
```
42-
43-
- Make sure you have GPG gradle config setup in `~/.gradle/gradle.properties` for signing
44-
```
45-
signing.gnupg.executable=gpg
46-
signing.gnupg.useLegacyGpg=true
47-
signing.gnupg.homeDir=/path/to/.gnupg/
48-
signing.gnupg.optionsFile=/path/to/.gnupg/gpg.conf
49-
signing.gnupg.keyName=0x61471B8AB3890961
50-
```
51-
52-
- Make sure GPG is picking up YubiKey to sign releases
53-
```bash
54-
gpg --card-status
55-
```
56-
57-
- Disable YubiKey touch for signing
58-
```bash
59-
ykman openpgp keys set-touch sig off
60-
```
61-
62-
- Perform a clean build
63-
```bash
64-
./gradlew clean -DKMP_TARGETS_ALL
65-
./gradlew build -DKMP_TARGETS_ALL
66-
```
67-
68-
- Publish
69-
```bash
70-
./gradlew publishAllPublicationsToMavenCentralRepository --no-daemon --no-parallel -DKMP_TARGETS_ALL
71-
```
72-
73-
- Push release branch to repo (to publish from macOS)
74-
```bash
75-
git push -u origin release_"$VERSION_NAME"
76-
```
77-
78-
### Macos
79-
80-
- Spin up VM of macOS and ensure USB pass through worked for the YubiKey
81-
- Should ask for PIN to log in
82-
83-
- Sign a random `.txt` file (gpg tty for YubiKey PIN + gradle build don't mix)
84-
```shell
85-
gpg --sign --armor --detach ~/Documents/hello.txt
86-
```
87-
88-
- Ensure java version is greater than or equal to 11
89-
```shell
90-
java --version
91-
```
92-
93-
- Ensure you are in a `bash` shell
94-
```shell
95-
bash
96-
```
97-
98-
- Set version variable in terminal shell
99-
```bash
100-
VERSION_NAME="<version name>"
101-
```
102-
103-
- Pull the latest code from release branch
104-
```bash
105-
git checkout master
106-
git pull
107-
git checkout release_"$VERSION_NAME"
108-
```
109-
110-
- Make sure you have valid credentials in `~/.gradle/gradle.properties`
111-
```
112-
mavenCentralUsername=MyUserName
113-
mavenCentralPassword=MyPassword
114-
```
115-
116-
- Make sure you have GPG gradle config setup in `~/.gradle/gradle.properties` for signing
117-
```
118-
signing.gnupg.executable=gpg
119-
signing.gnupg.useLegacyGpg=true
120-
signing.gnupg.homeDir=/path/to/.gnupg/
121-
signing.gnupg.optionsFile=/path/to/.gnupg/gpg.conf
122-
signing.gnupg.keyName=0x61471B8AB3890961
123-
```
124-
125-
- Perform a clean build
126-
```bash
127-
MACOS_TARGETS="JVM,JS,IOS_ARM32,IOS_ARM64,IOS_X64,IOS_SIMULATOR_ARM64,MACOS_ARM64,MACOS_X64,TVOS_ARM64,TVOS_X64,TVOS_SIMULATOR_ARM64,WATCHOS_ARM32,WATCHOS_ARM64,WATCHOS_DEVICE_ARM64,WATCHOS_X64,WATCHOS_X86,WATCHOS_SIMULATOR_ARM64,WASM,WASM_32"
128-
./gradlew clean -PKMP_TARGETS="$MACOS_TARGETS"
129-
./gradlew build -PKMP_TARGETS="$MACOS_TARGETS"
130-
```
131-
132-
- Publish macOS build
133-
```bash
134-
PUBLISH_TASKS=$(./gradlew tasks -PKMP_TARGETS="$MACOS_TARGETS" |
135-
grep "ToMavenCentralRepository" |
136-
cut -d ' ' -f 1 |
137-
grep -e "publishIos" -e "publishMacos" -e "publishTvos" -e "publishWatchos"
138-
)
139-
./gradlew $PUBLISH_TASKS -PKMP_TARGETS="$MACOS_TARGETS"
140-
```
141-
142-
### Linux
143-
144-
- Re-enable YubiKey touch for signing
145-
```bash
146-
ykman openpgp keys set-touch sig on
147-
```
148-
149-
- Close publications (Don't release yet)
150-
- Login to Sonatype OSS Nexus: [oss.sonatype.org](https://s01.oss.sonatype.org/#stagingRepositories)
151-
- Click on **Staging Repositories**
152-
- Select all Publications
153-
- Click **Close** then **Confirm**
154-
- Wait a bit, hit **Refresh** until the *Status* changes to *Closed*
155-
156-
- Check Publication
157-
```bash
158-
./gradlew clean -DKMP_TARGETS_ALL
159-
./gradlew :tools:check-publication:build --refresh-dependencies -PCHECK_PUBLICATION -DKMP_TARGETS_ALL
160-
```
161-
162-
- **Release** publications from Sonatype OSS Nexus StagingRepositories manager
163-
164-
- Merge release branch to `master`
165-
```bash
166-
git checkout master
167-
git pull
168-
git merge --no-ff -S release_"$VERSION_NAME"
169-
```
170-
171-
- Update `VERSION_NAME` (add `-SNAPSHOT`) and `VERSION_CODE` in root project's `gradle.properties` file
172-
173-
- Commit changes
174-
```bash
175-
git add --all
176-
git commit -S -m "Prepare for next development iteration"
177-
```
178-
179-
- Push Changes
180-
```bash
181-
git push
182-
```
183-
184-
- Push Tag
185-
```bash
186-
git push origin "$VERSION_NAME"
187-
```
188-
189-
- Delete release branch on GitHub
190-
191-
- Delete local release branch
192-
```bash
193-
git branch -D release_"$VERSION_NAME"
194-
```
195-
196-
### Macos
197-
198-
- Checkout master
199-
```bash
200-
git checkout master
201-
git pull
202-
```
203-
204-
- Delete local release branch
205-
```bash
206-
git branch -D release_"$VERSION_NAME"
207-
```
208-
209-
- Shutdown VMs (if not needed anymore)
210-
211-
### Linux
212-
213-
- Wait for releases to become available on [MavenCentral](https://repo1.maven.org/maven2/org/kotlincrypto/core/)
214-
- Draft new release on GitHub
215-
- Enter the release name <VersionName> as tag and title
216-
- Have the description point to the changelog
3+
The release process is documented [HERE](https://github.com/KotlinCrypto/documentation/blob/master/RELEASING.md)

0 commit comments

Comments
 (0)