From 8bb37ad18f780b159f05bd2a203eb014ecd64969 Mon Sep 17 00:00:00 2001 From: MarkG Date: Fri, 27 Dec 2024 14:04:25 +0700 Subject: [PATCH] [#557] Change create release PR approach --- .../create_release_pull_request.yml | 30 ++++--------------- 1 file changed, 5 insertions(+), 25 deletions(-) diff --git a/.github/project_workflows/create_release_pull_request.yml b/.github/project_workflows/create_release_pull_request.yml index a1da9775..a7a1fe42 100644 --- a/.github/project_workflows/create_release_pull_request.yml +++ b/.github/project_workflows/create_release_pull_request.yml @@ -21,38 +21,18 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Find HEAD commit - id: head - run: echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT - - - name: Build changelog on "main" - id: changelog - uses: mikepenz/release-changelog-builder-action@v4 - with: - configuration: ".github/workflows/configs/changelog-config.json" - # Listing PRs from the last tag to the HEAD commit - toTag: ${{ steps.head.outputs.sha }} - token: ${{ secrets.GITHUB_TOKEN }} - - - name: Prepare variables + - name: Get release version run: | filename=$(find . -maxdepth 1 -name "*.xcodeproj" -exec basename {} .xcodeproj \; | head -n 1) release_version=$(sed -n 's/.*MARKETING_VERSION *= *\([^;]*\);.*/\1/p' "$filename.xcodeproj/project.pbxproj" | head -n 1 | sed 's/^[^=]*=\s*//' | tr -d ' ') echo $release_version echo "RELEASE_VERSION=$release_version" >> "$GITHUB_ENV" - echo "${{ steps.changelog.outputs.changelog }}" | sed 's/"/\\"/g' > escaped-changelog.txt - - name: Create Release branch - uses: peterjgrainger/action-create-branch@v2.2.0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - uses: nimblehq/github-actions-workflows/create_release_pull_request@0.1.10 with: - branch: release/${{ env.RELEASE_VERSION }} - - - name: Create pull request - run: gh pr create --draft -B main -H release/${{ env.RELEASE_VERSION }} -t 'Release - ${{ env.RELEASE_VERSION }}' -b "$(cat escaped-changelog.txt)" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + release_version: ${{ env.RELEASE_VERSION }} + changelog_configuration: ".github/workflows/config/changelog-config.json" + assignee: bot-nimble create_bump_version_pull_request: name: Create Bump Version Pull Request