diff --git a/.github/workflows/oneshot_candidate_release.yml b/.github/workflows/oneshot_candidate_release.yml index 94032cf5bd96..ee0f305c9416 100644 --- a/.github/workflows/oneshot_candidate_release.yml +++ b/.github/workflows/oneshot_candidate_release.yml @@ -2,6 +2,11 @@ name: Oneshot candidate release on: workflow_dispatch: + inputs: + build_type: + description: The type of build version to produce ("stable", "rc", or "dev") + type: string + default: "rc" jobs: tag_release: @@ -13,12 +18,29 @@ jobs: with: token: ${{ secrets.WRITE_ACCESS_TOKEN }} + # Compute version suffix based on inputs (default to 'rc') + - name: Compute stable version suffix + if: ${{ inputs.build_type == 'stable' }} + run: | + version_suffix="" + echo "version_suffix=${version_suffix}" >> $GITHUB_ENV + - name: Compute rc version suffix + if: ${{ inputs.build_type == 'rc' || inputs.build_type == '' }} + run: | + version_suffix="$(printf 'rc%(%Y%m%d)T')" + echo "version_suffix=${version_suffix}" >> $GITHUB_ENV + - name: Compute dev version suffix + if: ${{ inputs.build_type == 'dev' }} + run: | + version_suffix=".dev0+${{ github.sha }}" + echo "version_suffix=${version_suffix}" >> $GITHUB_ENV + - name: Compute version run: | git fetch --depth=1 origin +refs/tags/*:refs/tags/* # common version + tag - package_version="$(python3 build_tools/python_deploy/compute_common_version.py -rc)" + package_version="$(python3 build_tools/python_deploy/compute_common_version.py --version-suffix=${version_suffix})" tag_name="iree-${package_version}" echo "package_version=${package_version}" >> $GITHUB_ENV echo "tag_name=${tag_name}" >> $GITHUB_ENV @@ -28,11 +50,11 @@ jobs: echo "legacy_package_version=${legacy_package_version}" >> $GITHUB_ENV # iree-base-compiler version - compiler_package_version="$(python3 build_tools/python_deploy/compute_local_version.py compiler -rc)" + compiler_package_version="$(python3 build_tools/python_deploy/compute_local_version.py compiler --version-suffix=${version_suffix})" echo "compiler_package_version=${compiler_package_version}" >> $GITHUB_ENV # iree-base-runtime version - runtime_package_version="$(python3 build_tools/python_deploy/compute_local_version.py runtime -rc)" + runtime_package_version="$(python3 build_tools/python_deploy/compute_local_version.py runtime --version-suffix=${version_suffix})" echo "runtime_package_version=${runtime_package_version}" >> $GITHUB_ENV - name: Updating candidate tag diff --git a/docs/website/docs/developers/general/one-shot-patch.png b/docs/website/docs/developers/general/one-shot-patch.png new file mode 100644 index 000000000000..33793868397e Binary files /dev/null and b/docs/website/docs/developers/general/one-shot-patch.png differ diff --git a/docs/website/docs/developers/general/release-management.md b/docs/website/docs/developers/general/release-management.md index 89a3710e8a25..e568ad903042 100644 --- a/docs/website/docs/developers/general/release-management.md +++ b/docs/website/docs/developers/general/release-management.md @@ -81,3 +81,37 @@ request that some feature make the cut. 3. Complete any remaining checkbox items on the release tracking issue then close it and open a new one for the next release. + +## Creating a patch release + +1. Create a new branch. + + Checkout the corresponding stable release and create a branch for the patch release: + + ```shell + git checkout iree-3.0.0 + git checkout -b iree-3.0.1 + ``` + +2. Apply and commit the patches. + +3. Set the patch level: + + * Adjust `compiler/version.json` if patches are applied to the compiler. + + * Adjust `runtime/version.json` if patches are applied to the runtime. + +4. Push all changes to the new branch. + +5. Trigger the + [_Oneshot candidate release_ workflow](https://github.com/iree-org/iree/actions/workflows/oneshot_candidate_release.yml) + to create a release. + + * Select to run the workflow from the patch branch. + + * Set the type of build version to produce to "stable". + + ![one_shot_patch](./one-shot-patch.png) + +6. Follow the documentation above to promote to stable. + The step to create a new tag can be skipped.