Skip to content

Commit 8bb37ad

Browse files
committed
[#557] Change create release PR approach
1 parent 44efb98 commit 8bb37ad

File tree

1 file changed

+5
-25
lines changed

1 file changed

+5
-25
lines changed

.github/project_workflows/create_release_pull_request.yml

Lines changed: 5 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -21,38 +21,18 @@ jobs:
2121
- name: Checkout code
2222
uses: actions/checkout@v4
2323

24-
- name: Find HEAD commit
25-
id: head
26-
run: echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
27-
28-
- name: Build changelog on "main"
29-
id: changelog
30-
uses: mikepenz/release-changelog-builder-action@v4
31-
with:
32-
configuration: ".github/workflows/configs/changelog-config.json"
33-
# Listing PRs from the last tag to the HEAD commit
34-
toTag: ${{ steps.head.outputs.sha }}
35-
token: ${{ secrets.GITHUB_TOKEN }}
36-
37-
- name: Prepare variables
24+
- name: Get release version
3825
run: |
3926
filename=$(find . -maxdepth 1 -name "*.xcodeproj" -exec basename {} .xcodeproj \; | head -n 1)
4027
release_version=$(sed -n 's/.*MARKETING_VERSION *= *\([^;]*\);.*/\1/p' "$filename.xcodeproj/project.pbxproj" | head -n 1 | sed 's/^[^=]*=\s*//' | tr -d ' ')
4128
echo $release_version
4229
echo "RELEASE_VERSION=$release_version" >> "$GITHUB_ENV"
43-
echo "${{ steps.changelog.outputs.changelog }}" | sed 's/"/\\"/g' > escaped-changelog.txt
4430
45-
- name: Create Release branch
46-
uses: peterjgrainger/[email protected]
47-
env:
48-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
- uses: nimblehq/github-actions-workflows/[email protected]
4932
with:
50-
branch: release/${{ env.RELEASE_VERSION }}
51-
52-
- name: Create pull request
53-
run: gh pr create --draft -B main -H release/${{ env.RELEASE_VERSION }} -t 'Release - ${{ env.RELEASE_VERSION }}' -b "$(cat escaped-changelog.txt)"
54-
env:
55-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
release_version: ${{ env.RELEASE_VERSION }}
34+
changelog_configuration: ".github/workflows/config/changelog-config.json"
35+
assignee: bot-nimble
5636

5737
create_bump_version_pull_request:
5838
name: Create Bump Version Pull Request

0 commit comments

Comments
 (0)