File tree 1 file changed +48
-0
lines changed
1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change
1
+ # This is a basic workflow that is manually triggered
2
+
3
+ name : Create release branch from develop
4
+ on :
5
+ workflow_dispatch :
6
+ branches : [ "develop" ]
7
+
8
+ jobs :
9
+ draft-new-release :
10
+ if :
11
+ contains(github.ref, 'develop')
12
+ name : " Draft a new release"
13
+ runs-on : ubuntu-latest
14
+ steps :
15
+ - uses : actions/checkout@v4
16
+ - name : Set up Python 3.9
17
+ uses : actions/setup-python@v4
18
+ with :
19
+ python-version : " 3.9"
20
+ - name : Install dependencies
21
+ run : |
22
+ python -m pip install --upgrade pip
23
+ - name : Install dependencies
24
+ run : |
25
+ python -m pip install poetry
26
+ poetry install
27
+ - name : Build
28
+ id : build-step
29
+ run : |
30
+ poetry build
31
+ VERSION=$(poetry version -s)
32
+ echo "$VERSION"
33
+ echo "version=$VERSION" >> $GITHUB_OUTPUT
34
+
35
+ - name : Create release branch
36
+ run : git checkout -b release/${{ steps.build-step.outputs.version }}
37
+
38
+ - name : Push new branch
39
+ run : git push origin release/${{ steps.build-step.outputs.version }}
40
+ env :
41
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
42
+
43
+ - name : Create pull request
44
+ run : gh pr create -H release/${{ steps.build-step.outputs.version }} -B main
45
+ --title 'Release v${{ steps.build-step.outputs.version }}'
46
+ --body 'Created by Github action'
47
+ env :
48
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments