1# Release process 2 3This document simply outlines the release process: 4 51. Remove all `-dev` extension from versions (see below for all files) 6 72. Ensure CHANGELOG is updated and add current date 8 93. Update the local `release.sh` with the Elixir and OTP versions Hex should be built against. 10 114. Commit changes above with title "Release vVERSION" and generate new tag 12 135. Set branch latest to the new tag 14 156. Push main branch, latest branch and the new tag 16 177. Create GitHub release 18 198. Run the `release.sh` script and set the path to the private key for Elixir `ELIXIR_PEM=path/to/elixir.pem ./release.sh VERSION` where `VERSION` is the Hex version being released without a `v` prefix 20 219. Purge "installs" key on Fastly dashboard 22 2310. Increment version and add `-dev` extension to versions (see below for all files) 24 2511. Commit changes above with title "Bump to vVERSION-dev" 26 2712. Push main 28 29## All builds 30 31Hex needs to built for every Elixir supported vMAJOR.MINOR version. Currently that is every minor version released after 1.0.0. 32 33Always build on the latest patch version and make sure tests pass before building the archive. 34 35## Places where version is mentioned 36 37* mix.exs `@version` attribute 38* CHANGELOG.md 39 40## S3 paths 41 42* s3.hex.pm/installs/hex.ez (latest Hex built against oldest supported Elixir) 43* s3.hex.pm/installs/[ELIXIR]/hex.ez 44* s3.hex.pm/installs/[ELIXIR]/hex-[HEX].ez 45* s3.hex.pm/installs/hex-1.x.csv 46* s3.hex.pm/installs/hex-1.x.csv.signed 47 48## S3 upload commands 49 50Only for oldest elixir and OTP version: 51 52``` 53aws s3 cp hex.ez s3://s3.hex.pm/installs/hex.ez --acl public-read 54``` 55 56``` 57aws s3 cp hex.ez s3://s3.hex.pm/installs/[ELIXIR]/hex.ez --acl public-read && 58aws s3 cp hex-[HEX].ez s3://s3.hex.pm/installs/[ELIXIR]/hex-[HEX].ez --acl public-read && 59aws s3 cp hex-1.x.csv s3://s3.hex.pm/installs/hex-1.x.csv --acl public-read && 60aws s3 cp hex-1.x.csv.signed s3://s3.hex.pm/installs/hex-1.x.csv.signed --acl public-read 61``` 62 63## Hex release CSV 64 65### CSV format 66 67``` 68hex_version,sha512(hex-[HEX].ez),elixir_version 69``` 70 71Example: 72 73``` 740.9.0,4f6eae32124500117691740358df2a078d014f4d396a56a73b3e553e0b112b3f0ac9e0f7e0763feb85c889bac20571c6e028e5f4c252ac158cbb3c586efe992f,1.0.0 750.9.0,21fd3dbff18b2d2d51b41e147ac8bd13188a9840dae8f4ced6c150e227df64c3c6c5a472c3fd74e170f14fcf7cbeb7d85e12a520438bf0731c1ac55d2f6a4a8a,1.1.0 76``` 77 78### Generate sha 79 80``` 81shasum -a 512 hex-[HEX].ez 82``` 83 84### Sign CSV 85 86``` 87openssl dgst -sha512 -sign elixir.pem hex-1.x.csv | openssl base64 > hex-1.x.csv.signed 88``` 89