From 4308292d498c52142142345bb28ff6c26b49277e Mon Sep 17 00:00:00 2001 From: MarkG Date: Fri, 27 Dec 2024 14:05:49 +0700 Subject: [PATCH] test --- .../workflows/configs/changelog-config.json | 32 ++++++++++++++++ .../workflows/create_release_pull_request.yml | 38 +++++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 .github/workflows/configs/changelog-config.json create mode 100644 .github/workflows/create_release_pull_request.yml diff --git a/.github/workflows/configs/changelog-config.json b/.github/workflows/configs/changelog-config.json new file mode 100644 index 00000000..179678d8 --- /dev/null +++ b/.github/workflows/configs/changelog-config.json @@ -0,0 +1,32 @@ +{ + "categories": [ + { + "title": "## โœจ Features", + "labels": [ + "type: feature" + ] + }, + { + "title": "## ๐Ÿ› Bug fixes", + "labels": [ + "type: bug" + ] + }, + { + "title": "## ๐Ÿงน Chores", + "labels": [ + "type: chore" + ] + }, + { + "title": "## Others", + "exclude_labels": [ + "type: feature", + "type: bug", + "type: chore", + "type: release" + ] + } + ], + "max_pull_requests": 200 + } diff --git a/.github/workflows/create_release_pull_request.yml b/.github/workflows/create_release_pull_request.yml new file mode 100644 index 00000000..c8fd1388 --- /dev/null +++ b/.github/workflows/create_release_pull_request.yml @@ -0,0 +1,38 @@ +name: Create Release Pull Request + +on: + pull_request + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + create_release_pull_request: + name: Create Release Pull Request + runs-on: macOS-latest + permissions: + contents: write + pull-requests: write + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Bundle install + run: bundle install + + - name: Start Install Script for SwiftUI Template App + run: swift run --package-path Scripts/Swift/iOSTemplateMaker iOSTemplateMaker make --bundle-id-production co.nimblehq.ios.templates --bundle-id-staging co.nimblehq.ios.templates.staging --project-name TemplateApp --interface SwiftUI + + - 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" + + - uses: nimblehq/github-actions-workflows/create_release_pull_request@0.1.10 + with: + release_version: ${{ env.RELEASE_VERSION }} + changelog_configuration: ".github/workflows/configs/changelog-config.json" + assignee: bot-nimble \ No newline at end of file