Pushing a tag vX.Y.Z runs .github/workflows/release.yml, which does four
things in order:
- Checks that the tag matches
@versioninmix.exs. - Builds the NIF for six targets, with
crossfor the Linux arm64 and musl targets. - Attaches the six archives to a GitHub release.
- Writes
checksum-Elixir.ExOxvif.Native.exs, runs the tests, and runsmix hex.publish.
One-time setup
Generate a Hex API key with write access:
mix hex.user auth mix hex.user key generate --key-name ex_oxvif-ci --permission api:writeStore it as the repository secret
HEX_API_KEY:gh secret set HEX_API_KEY --repo cortfritz/ex_oxvif
Cutting a release
mix git_ops.release # bumps @version and updates CHANGELOG.md from commits
git push origin main
git push origin vX.Y.Z # git_ops creates the tag
You can also do it by hand: edit @version and CHANGELOG.md, commit, then
run git tag vX.Y.Z && git push origin main vX.Y.Z.
If the Hex step fails
If the NIFs built and the GitHub release exists, run the Publish to Hex.pm (manual) workflow from the Actions tab. It downloads the released archives, regenerates the checksums, and publishes.
Upgrading oxvif
Bump oxvif in native/ex_oxvif_nif/Cargo.toml and run cargo update -p oxvif. Then run mix test, which exercises the bindings against oxvif's
mock camera. oxvif is pre-1.0 and its minor versions can change the API.