notfilippo commented on code in PR #61:
URL: https://github.com/apache/datasketches-rust/pull/61#discussion_r2657751228


##########
RELEASE.md:
##########
@@ -0,0 +1,301 @@
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+
+# Release process for Rust components
+
+**NOTES:**
+
+* This process covers major and minor releases only. Bug-fix releases, which 
increment the third digit, are performed on
+  an A.B.X branch and not on main, but otherwise follow a similar process.
+* Some of these operations can be performed either on the Command-Line or in 
your IDE, whatever you prefer.
+
+## Preparation
+
+### Verify project health
+
+* Confirm correctness for:
+    * LICENSE
+    * NOTICE -- check for copyright dates
+    * README.md
+    * .asf.yaml
+    * .gitignore
+    * Cargo.toml -- ensure workspace metadata is correct
+
+* From Command Line or IDE:
+    * Run all checks: `cargo x lint`
+    * Run unit tests: `cargo x test`
+    * Run `cargo update` to ensure Cargo.lock is updated
+    <!-- TODO: * Run code coverage: `cargo llvm-cov --workspace` (target > 
90%). -->
+    * Run tests on all platforms (see CI workflow)
+    * Confirm that documentation builds: `cargo doc --open`
+    * Confirm that all **temporary** branches are checked into main and/or 
deleted, both local and remote
+    * Confirm any new bug fixes have corresponding tests
+    * Check that all dependencies are at stable versions (no pre-release 
dependencies in Cargo.toml)
+
+### Verify release tooling
+
+* From Command Line at project root:
+    * Confirm GitHub repository is current and git status is clean
+    * Ensure you have publishing credentials configured:
+        * If not set: `cargo login` and enter your crates.io API token
+    * At major version releases, search for deprecated code and remove at 
**Major Versions** only:
+        * `grep -r "deprecated" --include="*.rs" src/`
+
+## Create permanent release branch & release candidate version preparation
+
+* From IDE or Command Line:
+    * Create new **Permanent Branch**: "A.B.X"
+    * Modify `datasketches/Cargo.toml` version:
+        * Change version to `version = "A.B.X"`
+    * Commit the changes with message: "chore: prepare A.B.X release"
+    * Write down the Git hash: example: 40c6f4f
+    * Push Branch "A.B.X" to origin:
+        * `git push -u origin A.B.X`
+    * Do explicit push of tags on branch "A.B.X" to origin:
+        * `git push origin --tags`
+    * **DO NOT MERGE THIS PERMANENT BRANCH INTO THE DEFAULT BRANCH**
+
+* From a web browser at origin website: github.com/apache/datasketches-rust
+    * Select the A.B.X branch
+    * Confirm that the tag: A.B.X-rc.1 exists and that the tag is on the 
latest commit with the correct Git hash
+    * **DO NOT CREATE PR OR MERGE THIS PERMANENT BRANCH INTO THE DEFAULT 
BRANCH**
+
+## Publish release candidate to crates.io
+
+**IMPORTANT:** This step publishes a pre-release version to crates.io for 
community testing. The `-rc.N` suffix
+indicates this is not a final release.
+
+* Return to release branch A.B.X:
+    * `git checkout A.B.X`
+* Create Annotated TAG: A.B.X-rc.1
+    * `git tag -a A.B.X-rc.1 -m "release candidate 1 for version A.B.X"`
+* Modify `datasketches/Cargo.toml` version **temporarily**:
+    * Change version to `version = "A.B.X-rc.1"`
+* Review the package contents:
+    * `cargo package --list -p datasketches`
+    * Ensure no unwanted files are included
+    * Verify LICENSE, NOTICE, README.md are included
+* Run publish in dry-run and verify output:
+    * `cargo publish --dry-run -p datasketches`
+* Publish to crates.io:
+    * `cargo publish -p datasketches`
+* Verify the published crate:
+    * Visit https://crates.io/crates/datasketches
+    * Confirm A.B.X-rc.1 is visible
+    * Test installation: `cargo add [email protected]` in a test project
+* Reset all temporary changes with `git checkout -f A.B.X`:
+    * `cat datasketches/Cargo.toml | grep version` # should show A.B.X
+
+## Create and/or checkout local *dist/dev* directories on your system
+
+* If you have not already, on your system create the two directory structures 
that mirror the dist.apache.org/repos/
+  directories:
+    * `mkdir -p dist/dev/datasketches/`
+    * `mkdir -p dist/release/datasketches/`
+* Checkout both "dev" and "release" directories:
+    * Open a terminal in the dist/dev/datasketches directory and do a checkout:
+        * `svn co https://dist.apache.org/repos/dist/dev/datasketches/ .`      
#Note the DOT
+        * `svn status`    # make sure it is clean
+    * Open a terminal in the dist/release/datasketches directory and do a 
checkout:
+        * `svn co https://dist.apache.org/repos/dist/release/datasketches/ .`  
#Note the DOT
+        * `svn status`    # make sure it is clean
+
+## Create the candidate Apache release distribution on *dist/dev*
+
+### Create primary zip files & signatures
+
+* You will need the following arguments:
+    * Absolute path of target project.basedir on your system
+    * Artifact name: datasketches-rust
+    * GitHub Tag: A.B.X-rc.1 (or rc.N)
+
+* Start a new terminal in the *dist/dev/datasketches/scripts* directory on 
your system:
+    * To confirm *gpg-agent* is running type:
+        * `ps -axww | grep gpg`  # you should see something like:
+            * *64438 ?? 0:30.33 gpg-agent --homedir /Users/\<name\>/.gnupg 
--use-standard-socket --daemon*
+        * To start GPG if GPG Agent is not running:
+            * `eval $(gpg-agent --daemon)`
+    * Run the deployment script:
+        * `./bashDeployToDist.sh 
/Users/\<name\>/dev/git/Apache/datasketches-rust datasketches-rust A.B.X-rc.1`
+        * Follow the instructions
+        * NOTE: if you get the error "gpg: signing failed: No pinentry":
+            * open .gnupg/gpg-agent.conf
+            * change to: pinentry-program /usr/local/bin/pinentry-tty
+            * reload the gpg agent in the terminal: `gpg-connect-agent 
reloadagent /bye`
+            * restart the ./bashDeployToDist script
+        * Close the terminal
+
+* Check and grab the web URL: 
*https://dist.apache.org/repos/dist/dev/datasketches/rust/A.B.X-rc.1/*
+    * There should be 3 files: \*-src.zip, \*-src.zip.asc, \*-src.zip.sha512
+    * Verify signatures:
+        * `gpg --verify datasketches-rust-A.B.X-rc.1-src.zip.asc 
datasketches-rust-A.B.X-rc.1-src.zip`
+        * `sha512sum -c datasketches-rust-A.B.X-rc.1-src.zip.sha512`
+
+## Prepare & Send [VOTE] Letter to dev@
+
+* See VoteTemplates directory for a recent example

Review Comment:
   That's interesting. I'm in favour of this but I'm new to the ASF way of 
doing things so maybe @leerho can have a more informed opinion.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to