From a20e5f722ae4b71bee084fbe10da4a6582c0ce0e Mon Sep 17 00:00:00 2001 From: Gonzalo Casas Date: Wed, 11 Sep 2024 14:29:59 +0200 Subject: [PATCH] Update workflow to only allow releasing from pull requests --- .github/workflows/release.yml | 1 + CONTRIBUTING.md | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2df918e..f2119ca 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,6 +7,7 @@ name: Create Release jobs: build: + if: github.ref == 'refs/heads/main' runs-on: ${{ matrix.os }} strategy: matrix: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7cd6fc2..2b0ffae 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -56,3 +56,37 @@ When [proposing a new feature](https://github.com/gramaziokohler/aixd_ara/issues * Explain in detail how it would work. * Keep the scope as narrow as possible, to make it easier to implement. + +# Releasing a new version + +Ready to release a new version of the project? Here's how to do it! + +We follow [semantic versioning](https://semver.org) principles for our release process. +To create a new release, follow these steps: + +1. Ensure all changes intended for the release are merged into the **main** branch. + +2. Create a new branch from **main** to prepare the release (replace `x.y.z` with the version number you plan to release): + + ```bash + git checkout main + git pull + git checkout -b prepare-release-x.y.z + ``` + +3. Ensure all checks and tests pass successfully. Use the `invoke check` and `invoke test` commands to verify. + +4. Decide on the versioning increment type for the release based on the changes since the last version: + - `major` for breaking changes to the API + - `minor` for adding functionality in a backwards-compatible manner + - `patch` for backwards-compatible bug fixes + +5. Run the release command with the appropriate release type: + + ```bash + invoke release [release_type] + ``` +6. Create a merge request to merge the branch into **main**. Check the changes and make sure + everything looks good, before merging. + +7. Celebrate! 💃