Prepare release #45
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Prepare release" | |
on: | |
workflow_dispatch: | |
inputs: | |
last_minor: | |
description: "Next release after this one is going to be a major (don't check on patch-level releases)" | |
type: boolean | |
default: false | |
jobs: | |
prepare: | |
runs-on: ubuntu-latest | |
env: | |
BUNDLE_ONLY: "release" | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: "3.2" | |
bundler-cache: true | |
- id: pipeline_context | |
uses: ./.github/actions/extract_pipeline_context | |
with: | |
last_minor: ${{ inputs.last_minor }} | |
- name: "Bump version" | |
run: bin/release/bump-version ${{ steps.pipeline_context.outputs.candidate_version }} | |
- name: "Bump docker image version" | |
if: github.ref_name == 'main' | |
run: bin/release/bump-docker-image-version ${{ steps.pipeline_context.outputs.candidate_version }} | |
- name: "Bump installer starter frontend version" | |
if: github.ref_name == 'main' | |
run: bin/release/bump-starter-frontend-version ${{ steps.pipeline_context.outputs.candidate_patch_branch }} | |
- name: "Update Changelog" | |
run: bin/release/update-changelog ${{ steps.pipeline_context.outputs.candidate_tag }} | |
- name: "Compute labels for the PR" | |
id: pr_labels | |
run: | | |
if [ ${{ inputs.last_minor }} == 'true' ]; then | |
last_minor_label="release:generate-last_minor" | |
else | |
last_minor_label="" | |
fi | |
echo "labels='changelog:skip release:generate $last_minor_label'" >> $GITHUB_OUTPUT | |
- uses: ./.github/actions/commit_and_submit_pull_request | |
with: | |
labels: ${{ steps.pr_labels.outputs.labels }} | |
message: | | |
Prepare release for Solidus ${{ steps.pipeline_context.outputs.candidate_tag }} | |
This code has been automatically generated by our 'Prepare release' GitHub | |
action. | |
The actual release is not part of the automation, and it still needs to be manually done by a maintainer. |