Skip to content

Commit 2faa585

Browse files
committed
test
1 parent fd30a0e commit 2faa585

File tree

2 files changed

+119
-0
lines changed

2 files changed

+119
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"categories": [
3+
{
4+
"title": "## ✨ Features",
5+
"labels": [
6+
"type: feature"
7+
]
8+
},
9+
{
10+
"title": "## 🐛 Bug fixes",
11+
"labels": [
12+
"type: bug"
13+
]
14+
},
15+
{
16+
"title": "## 🧹 Chores",
17+
"labels": [
18+
"type: chore"
19+
]
20+
},
21+
{
22+
"title": "## Others",
23+
"exclude_labels": [
24+
"type: feature",
25+
"type: bug",
26+
"type: chore",
27+
"type: release"
28+
]
29+
}
30+
],
31+
"max_pull_requests": 200
32+
}
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name: Create Release Pull Request
2+
3+
on:
4+
push:
5+
branches: [ feature/**, bug/**, chore/** ]
6+
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}
9+
cancel-in-progress: true
10+
11+
jobs:
12+
create_release_pull_request:
13+
name: Create Release Pull Request
14+
runs-on: macOS-latest
15+
timeout-minutes: 30
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
20+
- name: Bundle install
21+
run: bundle install
22+
23+
- name: Start Install Script for SwiftUI Template App
24+
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
25+
26+
- name: Get release version
27+
run: |
28+
filename=$(find . -maxdepth 1 -name "*.xcodeproj" -exec basename {} .xcodeproj \; | head -n 1)
29+
release_version=$(sed -n 's/.*MARKETING_VERSION *= *\([^;]*\);.*/\1/p' "$filename.xcodeproj/project.pbxproj" | head -n 1 | sed 's/^[^=]*=\s*//' | tr -d ' ')
30+
echo $release_version
31+
echo "RELEASE_VERSION=$release_version" >> "$GITHUB_ENV"
32+
echo $release_version
33+
34+
- uses: nimblehq/github-actions-workflows/[email protected]
35+
with:
36+
release_version: "1.0.0"
37+
changelog_configuration: ".github/workflows/configs/changelog-config.json"
38+
assignee: bot-nimble
39+
40+
# create_bump_version_pull_request:
41+
# name: Create Bump Version Pull Request
42+
# runs-on: macos-latest
43+
# timeout-minutes: 30
44+
# permissions:
45+
# contents: write
46+
# pull-requests: write
47+
# steps:
48+
# - name: Validate Version Input
49+
# run: |
50+
# if ! [[ "${{ github.event.inputs.nextVersion }}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
51+
# echo "Error: nextVersion must follow semantic versioning (e.g., 1.2.3)"
52+
# exit 1
53+
# fi
54+
# - name: Create Bump Version branch
55+
# uses: peterjgrainger/[email protected]
56+
# env:
57+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
58+
# with:
59+
# branch: chore/bump-version-to-${{ github.event.inputs.nextVersion }}
60+
61+
# - name: Checkout code
62+
# uses: actions/checkout@v4
63+
# with:
64+
# ref: chore/bump-version-to-${{ github.event.inputs.nextVersion }}
65+
66+
# - name: Bump version
67+
# run: |
68+
# filename=$(find . -maxdepth 1 -name "*.xcodeproj" -exec basename {} .xcodeproj \; | head -n 1)
69+
# sed -i "" "s/MARKETING_VERSION = .*/MARKETING_VERSION = ${{ github.event.inputs.nextVersion }};/g" $filename.xcodeproj/project.pbxproj
70+
71+
# - name: Set up Git
72+
# run: |
73+
# git config --global user.name 'Github Actions'
74+
# git config --global user.email '[email protected]'
75+
76+
# - name: Commit changes
77+
# run: |
78+
# git add .
79+
# git commit -m "[Chore] Bump version to ${{ github.event.inputs.nextVersion }}"
80+
# git push origin HEAD
81+
82+
# - name: Create pull request
83+
# run: |
84+
# echo -e "## What happened 👀\n\nBump version to ${{ github.event.inputs.nextVersion }}" > body
85+
# export body=$(cat body) ; gh pr create --draft -B develop -H chore/bump-version-to-${{ github.event.inputs.nextVersion }} -t '[Chore] Bump version to ${{ github.event.inputs.nextVersion }}' -b "$body"
86+
# env:
87+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)