mirror of
https://github.com/twentyhq/twenty.git
synced 2024-11-23 14:03:35 +03:00
2fdd2f4949
Here is a fix for https://github.com/twentyhq/twenty/issues/5163 I tested it on another repo and should work as intended this time arround. I've created two workflows - One that creates a PR - The second that watch PR merge with specific labels - I also check the author of the PR to make sure it was created by a bot You can now disable the creation of the a draft release --------- Co-authored-by: Charles Bochet <charles@twenty.com>
45 lines
1.4 KiB
YAML
45 lines
1.4 KiB
YAML
name: "Release: create"
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
version:
|
|
required: true
|
|
description: Version to release, without the v (e.g. 1.2.3)
|
|
ref:
|
|
default: main
|
|
description: Ref to start the release from (e.g. main, sha)
|
|
create_release:
|
|
type: boolean
|
|
default: true
|
|
description: Create a release after merging the PR
|
|
|
|
jobs:
|
|
create_pr:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
with:
|
|
ref: ${{ github.event.inputs.ref }}
|
|
|
|
- name: Sanitize version
|
|
id: sanitize
|
|
run: |
|
|
echo version=$(echo ${{ github.event.inputs.version }} | sed 's/^v//') >> $GITHUB_OUTPUT
|
|
|
|
- name: Update versions
|
|
run: |
|
|
echo ${{ steps.sanitize.outputs.version }} > version.txt
|
|
|
|
- name: Create Pull Request
|
|
uses: peter-evans/create-pull-request@v6
|
|
with:
|
|
branch: release/${{ steps.sanitize.outputs.version }}
|
|
commit-message: "chore: release v${{ steps.sanitize.outputs.version }}"
|
|
committer: Github Action Deploy <github-action-deploy@twenty.com>
|
|
author: Github Action Deploy <github-action-deploy@twenty.com>
|
|
title: Release v${{ steps.sanitize.outputs.version }}
|
|
labels: |
|
|
release
|
|
${{ github.event.inputs.create_release == true && 'create_release' || '' }}
|