Skip to content

Commit 0541444

Browse files
committed
added release script
1 parent edc8c0b commit 0541444

4 files changed

Lines changed: 62 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
## [0.0.7](https://github.com/involvex/awesome-github-app/compare/v0.0.6...v0.0.7) (2026-02-28)
2+
13
## [0.0.6](https://github.com/involvex/awesome-github-app/compare/v0.0.3...v0.0.6) (2026-02-28)
24

35
### Bug Fixes

app.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"name": "awesome-github-app",
44
"slug": "awesome-github-app",
55
"owner": "involvex",
6-
"version": "0.0.6",
6+
"version": "0.0.7",
77
"orientation": "portrait",
88
"userInterfaceStyle": "automatic",
99
"githubUrl": "https://github.com/involvex/awesome-github-app.git",
@@ -27,7 +27,7 @@
2727
"backgroundColor": "#ffffff"
2828
},
2929
"userInterfaceStyle": "automatic",
30-
"versionCode": 6
30+
"versionCode": 7
3131
},
3232
"web": {
3333
"output": "single",
@@ -36,7 +36,7 @@
3636
},
3737
"ios": {
3838
"bundleIdentifier": "com.involvex.awesomegithubapp",
39-
"buildNumber": "6",
39+
"buildNumber": "7",
4040
"infoPlist": {
4141
"ITSAppUsesNonExemptEncryption": false
4242
}

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "awesome-github-app",
3-
"version": "0.0.6",
3+
"version": "0.0.7",
44
"private": true,
55
"keywords": [
66
"github",
@@ -36,6 +36,7 @@
3636
"lint": "eslint src --ignore-pattern .claude --ignore-pattern dist --ignore-pattern build --ignore-pattern workers --ignore-pattern __tests__",
3737
"lint:fix": "eslint --fix src --ignore-pattern .claude --ignore-pattern dist --ignore-pattern build --ignore-pattern workers --ignore-pattern __tests__",
3838
"native:sync": "expo prebuild --no-install",
39+
"release": "powershell -File scripts/release.ps1",
3940
"start": "expo start",
4041
"test": "jest",
4142
"test:ci": "jest --runInBand --ci --coverage",

scripts/release.ps1

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# scripts/release.ps1
2+
$ErrorActionPreference = 'Stop' # Exit immediately if a command exits with a non-zero status.
3+
4+
Write-Host "Optimizing new version submission flow (PowerShell compatible)..."
5+
6+
# 1. Ensure clean git working directory
7+
Write-Host "Checking for uncommitted changes..."
8+
$gitStatus = git status --porcelain
9+
if ($gitStatus) {
10+
Write-Host "Error: Uncommitted changes detected. Please commit or stash them before running the release script."
11+
exit 1
12+
}
13+
14+
# 2. Bump version, create commit and tag
15+
Write-Host "Bumping version and creating tag..."
16+
# `bun pm version patch` automatically updates package.json and bun.lockb, then creates a commit and a tag like vX.Y.Z
17+
bun run version:patch
18+
$oldVersionOutput = bun pm pkg get version
19+
$newVersionOutput = $oldVersionOutput
20+
$NEW_VERSION = ($newVersionOutput | Select-Object -Last 1).Trim() # Assumes the last line is the version, e.g., "v1.0.1"
21+
Write-Host "Version bumped to $NEW_VERSION"
22+
23+
# 2. Generate CHANGELOG.md
24+
Write-Host "Generating CHANGELOG.md..."
25+
bun run changelog
26+
27+
# 3. Run format and lint:fix to ensure all files (including package.json and CHANGELOG.md) adhere to standards
28+
# This step might modify package.json and CHANGELOG.md again if they were not perfectly formatted
29+
Write-Host "Running Build to ensure consistency..."
30+
bun run expo:prebuild # Reformats files, including package.json and CHANGELOG.md if needed
31+
#bun run lint:fix # Fixes linting issues, could touch files again
32+
33+
# 4. Stage all changes that occurred since the last commit (which was the version bump)
34+
# This includes CHANGELOG.md and any reformatting applied to package.json (or other files touched by format/lint)
35+
Write-Host "Staging all remaining changes (CHANGELOG.md and formatting updates)..."
36+
git add . # Use 'git add .' to stage all modifications
37+
38+
# 5. Amend the previous commit (the version bump commit) to include these new staged changes
39+
# git commit --amend --no-edit keeps the existing commit message (e.g., "vX.Y.Z")
40+
Write-Host "Amending previous commit to include CHANGELOG.md and formatting changes..."
41+
git commit --amend --no-edit
42+
43+
# 6. Force update the tag to point to the amended commit (important!)
44+
# `git commit --amend` creates a new commit SHA. We need to update the tag to point to this new SHA.
45+
Write-Host "Updating Git tag $NEW_VERSION to new commit SHA..."
46+
git tag -f $NEW_VERSION HEAD
47+
48+
# 7. Run the project build (dist/ is ignored, so it's not committed)
49+
Write-Host "Running project build..."
50+
bun run expo:prebuild
51+
52+
Write-Host "Release process complete for version $NEW_VERSION."
53+
Write-Host "Now Running: git push && git push --tags"
54+
git push
55+
git push --tags

0 commit comments

Comments
 (0)