diff --git a/release.sh b/.github/release.sh similarity index 100% rename from release.sh rename to .github/release.sh diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 3c84c04..d1f1732 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -18,4 +18,4 @@ jobs: profile: minimal override: true - name: Publish release - run: ./release.sh ${{ secrets.CRATES_IO_TOKEN }} + run: ./.github/release.sh ${{ secrets.CRATES_IO_TOKEN }} diff --git a/RELEASING.md b/RELEASING.md index 70fe82c..c64a5a2 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -1,9 +1,22 @@ # Releasing this crate +## Prerequisites + +* Ensure you have a GPG keypair created that you can use to sign the + release tag. +* Install `toml` with `cargo install toml`. + +## Releasing + 1. Run `./prepare-release.sh NEW_VERSION` (substituting the new desired version for `NEW_VERSION`). 2. Go to the GitHub releases page for this repo. There should be a draft release waiting. Edit it, set the title to the new version, - and point it to the new tag that was just pushed. -3. Once the release is created, GitHub Actions will build the new - release and publish it to crates.io. + point it to the new tag that was just pushed, and scan through the + release notes to ensure they seem sane. When you click the Publish + button, GitHub Actions will build the new release and publish it to + crates.io. + +## TODO + +* Use the GH API to do step #2 above. diff --git a/prepare-release.sh b/prepare-release.sh index 1438915..64ffe0d 100755 --- a/prepare-release.sh +++ b/prepare-release.sh @@ -64,3 +64,10 @@ cargo update --package espmonitor git commit -a -m "Bump to $dev_version" git push --tags origin "$(git rev-parse --abbrev-ref HEAD)" + +echo 'Now visit:' +echo +echo 'https://github.com/esp-rs/espmonitor/releases/' +echo +echo 'Rename the draft release, point the release to the newly-created tag, and' +echo 'publish the release. GH Actions will take care of publishing to crates.io'