Skip to content

Commit 2f3b3e7

Browse files
authored
chore: improve release automation (#17)
1 parent fa1fee6 commit 2f3b3e7

18 files changed

+386
-287
lines changed

.github/workflows/continuous_integration.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
run: brew link --overwrite swiftlint || brew install swiftlint
2020

2121
- name: Set up XCode
22-
run: sudo xcode-select --switch /Applications/Xcode_26.0.app
22+
run: sudo xcode-select --switch /Applications/Xcode_26.2.app/Contents/Developer
2323

2424
- name: Bundle Install
2525
run: bundle install
@@ -31,4 +31,4 @@ jobs:
3131
run: bundle exec fastlane coverage
3232

3333
- name: Lint
34-
run: bundle exec fastlane lint
34+
run: bundle exec fastlane lint

.github/workflows/prepare_release.yml

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

.github/workflows/release.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Release
2+
3+
on:
4+
workflow_dispatch: {}
5+
6+
env:
7+
XCODE_VERSION: 26.2
8+
NODE_VERSION: '24'
9+
10+
permissions:
11+
contents: write
12+
packages: write
13+
14+
jobs:
15+
release:
16+
runs-on: macos-15
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v5
20+
with:
21+
fetch-depth: 0
22+
token: ${{ secrets.CAP_GH_RELEASE_TOKEN }}
23+
24+
- name: Setup Node.js
25+
uses: actions/setup-node@v6
26+
with:
27+
node-version: ${{ env.NODE_VERSION }}
28+
29+
- name: Install dependencies
30+
run: |
31+
npm i
32+
33+
- name: Install CocoaPods
34+
run: |
35+
gem install cocoapods --no-document
36+
37+
- name: Set Xcode version
38+
run: |
39+
sudo xcode-select -s /Applications/Xcode_${{ env.XCODE_VERSION }}.app/Contents/Developer
40+
41+
- name: Run semantic-release
42+
env:
43+
GITHUB_TOKEN: ${{ secrets.CAP_GH_RELEASE_TOKEN }}
44+
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
45+
run: |
46+
npx semantic-release
47+
48+

.github/workflows/release_and_publish.yml

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

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,10 @@ fastlane/screenshots/**/*.png
6262
fastlane/test_output
6363

6464
build/
65+
66+
# macOS system files
67+
.DS_Store
68+
69+
# Node.js / npm
70+
node_modules/
71+
package-lock.json

.releaserc.json

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
"branches": ["main"],
3+
"tagFormat": "${version}",
4+
"plugins": [
5+
"@semantic-release/commit-analyzer",
6+
"@semantic-release/release-notes-generator",
7+
[
8+
"@semantic-release/exec",
9+
{
10+
"prepareCmd": "bash ./scripts/update_xcodeproj_version.sh ${nextRelease.version} \"IONGeolocationLib.xcodeproj/project.pbxproj\" && bash ./scripts/update_readme_version.sh ${nextRelease.version} \"IONGeolocationLib\" \"README.md\" && bash ./scripts/build_framework.sh \"IONGeolocationLib\" \"LICENSE\""
11+
}
12+
],
13+
"@semantic-release/changelog",
14+
[
15+
"@semantic-release/npm",
16+
{
17+
"npmPublish": false
18+
}
19+
],
20+
[
21+
"@semantic-release/git",
22+
{
23+
"assets": [
24+
"CHANGELOG.md",
25+
"IONGeolocationLib.xcodeproj/project.pbxproj",
26+
"IONGeolocationLib.podspec",
27+
"package.json",
28+
"README.md"
29+
],
30+
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
31+
}
32+
],
33+
[
34+
"@semantic-release/github",
35+
{
36+
"assets": [
37+
{
38+
"path": "IONGeolocationLib.zip",
39+
"label": "IONGeolocationLib XCFramework"
40+
}
41+
],
42+
"successComment": false,
43+
"failComment": false,
44+
"releasedLabels": false
45+
}
46+
],
47+
[
48+
"@semantic-release/exec",
49+
{
50+
"publishCmd": "bash ./scripts/publish_cocoapods.sh ${nextRelease.version} \"IONGeolocationLib\""
51+
}
52+
]
53+
]
54+
}

CHANGELOG.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
# Changelog
2-
All notable changes to this project will be documented in this file.
3-
4-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5-
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6-
71
## 2.0.0
82

93
### Breaking Changes
@@ -33,4 +27,4 @@ This change allows adding new configuration parameters in the future without bre
3327

3428
### Features
3529
- Add complete implementation, including `getCurrentPosition`, `watchPosition`, and `clearWatch`.
36-
- Create repository.
30+
- Create repository.

IONGeolocationLib.podspec

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
1+
require 'json'
2+
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
3+
14
Pod::Spec.new do |spec|
2-
spec.name = 'IONGeolocationLib'
3-
spec.version = '2.0.0'
5+
spec.name = package['name']
6+
spec.version = package['version']
47

5-
spec.summary = 'A native iOS library for Geolocation authorisation and monitoring.'
8+
spec.summary = package['description']
69
spec.description = 'A Swift library for iOS that provides simple, reliable access to device GPS capabilities. Get location data, monitor position changes, and manage location services with a clean, modern API.'
710

8-
spec.homepage = 'https://github.com/ionic-team/IONGeolocationLib-iOS'
9-
spec.license = { :type => 'MIT', :file => 'LICENSE' }
10-
spec.author = { 'OutSystems Mobile Ecosystem' => 'rd.mobileecosystem.team@outsystems.com' }
11+
spec.homepage = 'https://github.com/ionic-team/ion-ios-geolocation'
12+
spec.license = { :type => package['license'], :file => 'LICENSE' }
13+
spec.author = { package['author'] => package['email'] }
1114

12-
spec.source = { :http => "https://github.com/ionic-team/IONGeolocationLib-iOS/releases/download/#{spec.version}/IONGeolocationLib.zip", :type => "zip" }
15+
spec.source = { :http => "https://github.com/ionic-team/ion-ios-geolocation/releases/download/#{spec.version}/IONGeolocationLib.zip", :type => "zip" }
1316
spec.vendored_frameworks = "IONGeolocationLib.xcframework"
1417

1518
spec.ios.deployment_target = '14.0'
1619
spec.swift_versions = ['5.0', '5.1', '5.2', '5.3', '5.4', '5.5', '5.6', '5.7', '5.8', '5.9']
17-
end
20+
end

IONGeolocationLib.zip

-941 KB
Binary file not shown.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ A Swift library for iOS that provides simple, reliable access to device GPS capa
1919
`ion-ios-geolocation` is available through [CocoaPods](https://cocoapods.org). Add this to your Podfile:
2020

2121
```ruby
22-
pod 'IONGeolocationLib', '~> 2.0.0' # Use the latest 2.0.x version
22+
pod 'IONGeolocationLib', '~> 2.0.0'
2323
```
2424

2525
## Quick Start
@@ -285,4 +285,4 @@ Common issues and solutions:
285285

286286
## Support
287287

288-
- Report issues on our [Issue Tracker](https://github.com/ionic-team/ion-ios-geolocation/issues)
288+
- Report issues on our [Issue Tracker](https://github.com/ionic-team/ion-ios-geolocation/issues)

0 commit comments

Comments
 (0)