Skip to content

Commit 010e6db

Browse files
grdsdevclaude
andauthored
chore: restore and improve release-please configuration (#790)
* ci: add 60-minute timeout for all workflow jobs Set a global timeout of 60 minutes for all CI jobs to prevent workflows from running indefinitely. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> * feat: restore and improve release-please configuration - Replace semantic-release with release-please for better Swift library support - Add minimal release-please configuration with default values - Configure automatic version updates in Sources/Helpers/Version.swift - Simplify GitHub workflow to use googleapis/release-please-action@v4 - Remove Node.js dependencies and semantic-release configuration - Support releases from main and release/* branches 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> # Conflicts: # Sources/Helpers/Version.swift # Conflicts: # package-lock.json # package.json * chore: remove security workflow Remove CodeQL and dependency review workflow as it's not needed for this branch. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> * docs: update RELEASE.md for release-please workflow - Replace semantic-release documentation with release-please flow - Update configuration file references - Clarify the automated release process with release PRs - Remove outdated semantic-release and rc branch information 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> * ci: remove wrong defaults key * chore: update manigest file with latest version --------- Co-authored-by: Claude <[email protected]>
1 parent d930abd commit 010e6db

File tree

10 files changed

+37
-6970
lines changed

10 files changed

+37
-6970
lines changed

.github/workflows/release.yml

Lines changed: 7 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -4,55 +4,18 @@ on:
44
push:
55
branches:
66
- main
7-
- rc
8-
7+
- release/*
98
workflow_dispatch:
109

1110
permissions:
12-
contents: read
11+
contents: write
12+
pull-requests: write
1313

1414
jobs:
15-
release:
15+
release-please:
1616
runs-on: ubuntu-latest
17-
if: ${{ !contains(github.event.head_commit.message, 'skip ci') }}
18-
permissions:
19-
contents: write
20-
issues: write
21-
pull-requests: write
22-
id-token: write
23-
attestations: write
24-
2517
steps:
26-
- name: Generate token
27-
id: app-token
28-
uses: actions/create-github-app-token@v2
29-
with:
30-
app-id: ${{ secrets.APP_ID }}
31-
private-key: ${{ secrets.PRIVATE_KEY }}
32-
33-
- name: Checkout
34-
uses: actions/checkout@v5
35-
with:
36-
fetch-depth: 0
37-
token: ${{ steps.app-token.outputs.token }}
38-
persist-credentials: false
39-
40-
- name: Setup Node.js
41-
uses: actions/setup-node@v5
18+
- uses: googleapis/release-please-action@v4
19+
id: release
4220
with:
43-
node-version: "20"
44-
cache: "npm"
45-
46-
- name: Install dependencies
47-
run: npm ci
48-
49-
- name: Run semantic-release
50-
id: semantic-release
51-
run: npx semantic-release
52-
env:
53-
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
54-
continue-on-error: false
55-
56-
- name: Check if release was created
57-
if: steps.semantic-release.outcome == 'success'
58-
run: echo "Release created successfully"
21+
target-branch: ${{ github.ref_name }}

.github/workflows/security.yml

Lines changed: 0 additions & 54 deletions
This file was deleted.

.release-please-manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "2.33.0"
3+
}

.releaserc.json

Lines changed: 0 additions & 77 deletions
This file was deleted.

RELEASE.md

Lines changed: 15 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# Semantic Release Setup
1+
# Release-Please Setup
22

3-
This project uses [semantic-release](https://semantic-release.gitbook.io/) to automate version management and package publishing.
3+
This project uses [release-please](https://github.com/googleapis/release-please) to automate version management and package publishing.
44

55
## How it works
66

77
1. **Commit messages** follow the [Conventional Commits](https://www.conventionalcommits.org/) specification
8-
2. **Semantic-release** analyzes commits and determines the next version number
9-
3. **GitHub Actions** automatically creates releases when changes are pushed to `main`
8+
2. **Release-please** analyzes commits and determines the next version number
9+
3. **GitHub Actions** automatically creates release PRs and publishes releases
1010

1111
## Commit Message Format
1212

@@ -47,38 +47,30 @@ BREAKING CHANGE: This removes the old API
4747

4848
## Release Process
4949

50-
### Regular Releases (main branch)
50+
### Automated Release Flow
5151

52-
1. Push commits to `main` branch
53-
2. GitHub Actions runs semantic-release
54-
3. If there are releasable changes:
52+
1. **Push commits** to `main` branch with conventional commit messages
53+
2. **Release-please** analyzes commits and creates a release PR when needed
54+
3. **Review and merge** the release PR to trigger the actual release:
5555
- Version is updated in `Sources/Helpers/Version.swift`
5656
- `CHANGELOG.md` is updated
57-
- Git tag is created
57+
- Git tag is created (e.g., `v2.33.0`)
5858
- GitHub release is published
5959

60-
### Release Candidates (rc branch)
60+
### Release Branches
6161

62-
1. Push commits to `rc` branch
63-
2. GitHub Actions runs semantic-release
64-
3. If there are releasable changes:
65-
- Prerelease version is created (e.g., `2.31.0-rc.1`)
66-
- Version is updated in `Sources/Helpers/Version.swift`
67-
- `CHANGELOG.md` is updated
68-
- Git tag is created
69-
- GitHub prerelease is published
62+
Release-please also supports `release/*` branches for managing releases from feature branches if needed.
7063

7164
## Manual Release
7265

73-
To manually trigger a release:
66+
To manually trigger the release-please workflow:
7467

7568
1. Go to Actions tab in GitHub
76-
2. Select "Semantic Release" workflow
69+
2. Select "Release" workflow
7770
3. Click "Run workflow"
7871

7972
## Configuration Files
8073

81-
- `.releaserc.json`: Semantic-release configuration
82-
- `package.json`: Node.js dependencies
74+
- `release-please-config.json`: Release-please configuration
75+
- `.release-please-manifest.json`: Current version tracking
8376
- `.github/workflows/release.yml`: GitHub Actions workflow
84-
- `scripts/update-version.sh`: Version update script

Sources/Helpers/Version.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import Foundation
22
import XCTestDynamicOverlay
33

4-
private let _version = "2.33.0"
4+
private let _version = "2.33.0" // {x-release-please-version}
55

66
#if DEBUG
77
package let version = isTesting ? "0.0.0" : _version

0 commit comments

Comments
 (0)