Skip to content

Commit 7aca78f

Browse files
authored
feat: add release workflow (twentyhq#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
1 parent 0a6dc75 commit 7aca78f

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

.github/workflows/ci-release.yaml

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Release Twenty
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
version:
6+
required: true
7+
description: Version to release, without the v (e.g. 1.2.3)
8+
ref:
9+
default: main
10+
description: Ref to start the release from (e.g. main, sha)
11+
12+
jobs:
13+
release:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v2
18+
with:
19+
ref: ${{ github.event.inputs.ref }}
20+
21+
- name: Sanitize version
22+
id: sanitize
23+
run: |
24+
echo version=$(echo ${{ github.event.inputs.version }} | sed 's/^v//') >> $GITHUB_ENV
25+
26+
- name: Update versions
27+
working-directory: packages
28+
run: |
29+
for dir in twenty-docs twenty-emails twenty-front twenty-server twenty-ui twenty-website
30+
do
31+
cd $dir
32+
npm version ${{ steps.sanitize.outputs.version }} --no-git-tag-version
33+
cd ..
34+
done
35+
36+
# Make sure we have the latest changes before committing
37+
- name: Pull changes
38+
run: git pull --rebase
39+
40+
- uses: stefanzweifel/git-auto-commit-action@v4
41+
with:
42+
branch: ${{ github.event.inputs.ref }}
43+
commit_message: "chore: release v${{ steps.sanitize.outputs.version }}"
44+
tagging_message: v${{ steps.sanitize.outputs.version }}
45+
46+
commit_user_name: Github Action Deploy
47+
commit_user_email: [email protected]
48+
commit_author: Github Action Deploy <[email protected]>

0 commit comments

Comments
 (0)