-
Notifications
You must be signed in to change notification settings - Fork 56
57 lines (47 loc) · 1.66 KB
/
apply-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Apply release
on:
workflow_run:
workflows:
- Release framework
types:
- completed
workflow_dispatch:
jobs:
create_branch_and_open_pr:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Get package version
id: version
run: |
version=$(poetry search port-ocean | grep port-ocean | sed 's/.*(\(.*\))/\1/')
pr_name="Release ${version}"
branch_name="release-${version}"
echo "Branch Name: $branch_name"
echo "PR Name: $pr_name"
echo "pr_name=$pr_name" >> $GITHUB_OUTPUT
echo "branch_name=$branch_name" >> $GITHUB_OUTPUT
echo "version=$version" >> $GITHUB_OUTPUT
- name: Apply changes
run: |
git checkout -b ${{ steps.version.outputs.branch_name }}
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
./scripts/bump-all.sh ${{ steps.version.outputs.version }}
git push origin ${{ steps.version.outputs.branch_name }}
- name: Open pull request
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "Propose changes"
title: ${{ steps.version.outputs.pr_name }}
body: "This pull request includes changes made in the feature branch."
branch: ${{ steps.version.outputs.branch_name }}
base: main