From cfcc93dee12953ec878cfd745cb88f851397b88f Mon Sep 17 00:00:00 2001 From: Quentin G Date: Wed, 10 Apr 2024 18:49:05 +0200 Subject: [PATCH] feat: add release workflow (#4904) This workflow deploys a new release of Twenty. - It bumps projects version - Create a tag - Push the changes Then a tag pipeline will be automatically run triggering the deployment of new Dockerhub images Deployment to Twenty prod will be a manual action --- .github/workflows/ci-release.yaml | 48 +++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/ci-release.yaml diff --git a/.github/workflows/ci-release.yaml b/.github/workflows/ci-release.yaml new file mode 100644 index 000000000..2c28db365 --- /dev/null +++ b/.github/workflows/ci-release.yaml @@ -0,0 +1,48 @@ +name: Release Twenty +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) + +jobs: + release: + 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_ENV + + - name: Update versions + working-directory: packages + run: | + for dir in twenty-docs twenty-emails twenty-front twenty-server twenty-ui twenty-website + do + cd $dir + npm version ${{ steps.sanitize.outputs.version }} --no-git-tag-version + cd .. + done + + # Make sure we have the latest changes before committing + - name: Pull changes + run: git pull --rebase + + - uses: stefanzweifel/git-auto-commit-action@v4 + with: + branch: ${{ github.event.inputs.ref }} + commit_message: "chore: release v${{ steps.sanitize.outputs.version }}" + tagging_message: v${{ steps.sanitize.outputs.version }} + + commit_user_name: Github Action Deploy + commit_user_email: github-action-deploy@twenty.com + commit_author: Github Action Deploy