Skip to content

Commit 4b044ff

Browse files
committed
chore: prepare for beta release 0.1.0-beta.1
1 parent 95aa651 commit 4b044ff

File tree

5 files changed

+185
-43
lines changed

5 files changed

+185
-43
lines changed

.github/workflows/release.yml

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
prepare:
10+
name: Prepare Release
11+
runs-on: macos-14
12+
outputs:
13+
version: ${{ steps.version.outputs.version }}
14+
is_beta: ${{ steps.version.outputs.is_beta }}
15+
16+
steps:
17+
- name: Extract Version
18+
id: version
19+
run: |
20+
VERSION=${GITHUB_REF#refs/tags/v}
21+
echo "version=$VERSION" >> $GITHUB_OUTPUT
22+
if [[ $VERSION == *"-beta"* ]]; then
23+
echo "is_beta=true" >> $GITHUB_OUTPUT
24+
else
25+
echo "is_beta=false" >> $GITHUB_OUTPUT
26+
fi
27+
28+
validate:
29+
name: Validate Release
30+
needs: prepare
31+
runs-on: macos-14
32+
33+
steps:
34+
- uses: actions/checkout@v4
35+
36+
- name: Setup Swift
37+
uses: SwiftyLab/setup-swift@latest
38+
39+
- name: Verify Version File
40+
run: |
41+
SWIFT_VERSION=$(grep "current = " Sources/SwiftDevKit/Version.swift | cut -d'"' -f2)
42+
if [ "$SWIFT_VERSION" != "${{ needs.prepare.outputs.version }}" ]; then
43+
echo "Version mismatch: $SWIFT_VERSION != ${{ needs.prepare.outputs.version }}"
44+
exit 1
45+
fi
46+
47+
- name: Run Tests
48+
run: swift test -v --enable-code-coverage
49+
50+
- name: Generate Documentation
51+
run: |
52+
swift package --allow-writing-to-directory docs \
53+
generate-documentation --target SwiftDevKit \
54+
--output-path docs \
55+
--transform-for-static-hosting \
56+
--hosting-base-path SwiftDevKit
57+
58+
publish:
59+
name: Publish Release
60+
needs: [prepare, validate]
61+
runs-on: macos-14
62+
63+
steps:
64+
- uses: actions/checkout@v4
65+
with:
66+
fetch-depth: 0
67+
68+
- name: Generate Changelog
69+
id: changelog
70+
run: |
71+
previous_tag=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || echo "")
72+
if [ -z "$previous_tag" ]; then
73+
echo "# Initial Release" > CHANGELOG.md
74+
git log --pretty=format:"* %s" >> CHANGELOG.md
75+
else
76+
echo "# Changes since $previous_tag" > CHANGELOG.md
77+
git log --pretty=format:"* %s" $previous_tag..HEAD >> CHANGELOG.md
78+
fi
79+
80+
- name: Create GitHub Release
81+
uses: softprops/action-gh-release@v1
82+
with:
83+
body_path: CHANGELOG.md
84+
draft: false
85+
prerelease: ${{ needs.prepare.outputs.is_beta }}
86+
token: ${{ secrets.GITHUB_TOKEN }}
87+
files: |
88+
LICENSE
89+
README.md
90+
Package.swift
91+
92+
- name: Update Documentation
93+
if: needs.prepare.outputs.is_beta != 'true'
94+
run: |
95+
swift package --allow-writing-to-directory docs \
96+
generate-documentation --target SwiftDevKit \
97+
--output-path docs \
98+
--transform-for-static-hosting \
99+
--hosting-base-path SwiftDevKit
100+
101+
- name: Deploy Documentation
102+
if: needs.prepare.outputs.is_beta != 'true'
103+
uses: peaceiris/actions-gh-pages@v3
104+
with:
105+
github_token: ${{ secrets.GITHUB_TOKEN }}
106+
publish_dir: ./docs
107+
108+
- name: Notify CocoaPods
109+
if: needs.prepare.outputs.is_beta != 'true'
110+
run: |
111+
gem install cocoapods
112+
pod trunk push SwiftDevKit.podspec

Package.swift

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ let package = Package(
99
.iOS(.v16),
1010
.macOS(.v13),
1111
.tvOS(.v16),
12-
.watchOS(.v9)
12+
.watchOS(.v9),
1313
],
1414
products: [
1515
// Products define the executables and libraries a package produces, making them visible to other packages.
@@ -18,7 +18,7 @@ let package = Package(
1818
targets: ["SwiftDevKit"]),
1919
],
2020
dependencies: [
21-
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0")
21+
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0"),
2222
],
2323
targets: [
2424
// Targets are the basic building blocks of a package, defining a module or a test suite.
@@ -28,15 +28,12 @@ let package = Package(
2828
dependencies: [],
2929
resources: [.process("Resources")],
3030
swiftSettings: [
31-
.define("SWIFT_STRICT_CONCURRENCY", .when(configuration: .debug))
32-
]
33-
),
31+
.define("SWIFT_STRICT_CONCURRENCY", .when(configuration: .debug)),
32+
]),
3433
.testTarget(
3534
name: "SwiftDevKitTests",
3635
dependencies: ["SwiftDevKit"],
3736
swiftSettings: [
38-
.define("SWIFT_STRICT_CONCURRENCY", .when(configuration: .debug))
39-
]
40-
),
41-
]
42-
)
37+
.define("SWIFT_STRICT_CONCURRENCY", .when(configuration: .debug)),
38+
]),
39+
])

README.md

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# SwiftDevKit
22

3-
[![Swift](https://img.shields.io/badge/Swift-5.9-orange.svg)](https://swift.org)
3+
[![Swift](https://img.shields.io/badge/Swift-6.0-orange.svg)](https://swift.org)
44
[![SPM](https://img.shields.io/badge/SPM-compatible-brightgreen.svg)](https://swift.org/package-manager)
55
[![Platform](https://img.shields.io/badge/Platforms-iOS%20|%20macOS%20|%20tvOS%20|%20watchOS-lightgrey.svg)](https://developer.apple.com/swift/)
66
[![License](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
7-
[![Status](https://img.shields.io/badge/Status-In%20Development-yellow.svg)]()
7+
[![Status](https://img.shields.io/badge/Status-Beta-yellow.svg)]()
88

99
Think of it as your Swiss Army knife for Swift development - all the tools you need, right in your native environment.
1010

11-
> ⚠️ **Project Status**: Active Development
11+
> ⚠️ **Project Status**: Beta Release
1212
>
13-
> SwiftDevKit is currently in active development. The API is unstable and subject to change. While we're working hard to make it production-ready, it's not recommended for production use yet.
13+
> SwiftDevKit is currently in beta. While the core features are implemented and tested, the API might undergo refinements based on feedback.
1414
>
1515
> Want to contribute? Check out our [Contributing Guidelines](CONTRIBUTING.md)!
1616
@@ -71,36 +71,34 @@ SwiftDevKit provides powerful text processing tools for common string manipulati
7171

7272
## Installation
7373

74-
> ⚠️ Note: These installation methods will be available once we reach our first stable release.
75-
76-
### Swift Package Manager (Coming Soon)
74+
### Swift Package Manager
7775

7876
```swift
7977
dependencies: [
80-
.package(url: "https://github.com/owdax/SwiftDevKit.git", from: "1.0.0")
78+
.package(url: "https://github.com/owdax/SwiftDevKit.git", from: "0.1.0-beta.1")
8179
]
8280
```
8381

84-
### CocoaPods (Coming Soon)
82+
### CocoaPods
8583

8684
```ruby
87-
pod 'SwiftDevKit'
85+
pod 'SwiftDevKit', '0.1.0-beta.1'
8886
```
8987

9088
## Development Roadmap
9189

92-
1. 🏗 Core Infrastructure (In Progress)
90+
1. 🏗 Core Infrastructure (Completed)
9391
- Setting up development tools ✅
9492
- Establishing CI/CD pipeline ✅
9593
- Code quality tools integration ✅
9694

97-
2. 🧰 Core Features (In Progress)
95+
2. 🧰 Core Features (Beta)
9896
- Text Processing tools ✅
9997
- Case transformations
10098
- String truncation
10199
- Whitespace handling
102-
- Data Conversion utilities (Planned)
103-
- Development helpers (Planned)
100+
- Time and TimeZone utilities
101+
- Color and Number conversion ✅
104102

105103
3. 🔒 Advanced Features (Planned)
106104
- Cryptography utilities

Sources/SwiftDevKit/Version.swift

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/// Version information for SwiftDevKit
2+
public enum Version {
3+
/// The current version of SwiftDevKit
4+
public static let current = "0.1.0-beta.1"
5+
6+
/// Build number, automatically incremented by CI
7+
public static let build = "1"
8+
9+
/// Whether this is a beta release
10+
public static let isBeta = true
11+
12+
/// The minimum supported Swift version
13+
public static let minimumSwiftVersion = "6.0"
14+
15+
/// The release date of this version
16+
public static let releaseDate = "2024-01-21"
17+
18+
/// Human-readable version string
19+
public static var versionString: String {
20+
"\(current) (\(build))"
21+
}
22+
}

SwiftDevKit.podspec

Lines changed: 32 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,44 @@
11
Pod::Spec.new do |s|
22
s.name = 'SwiftDevKit'
3-
s.version = '0.1.0'
4-
s.summary = 'A comprehensive Swift SDK for developers - your Swiss Army knife for Swift development.'
5-
3+
s.version = '0.1.0-beta.1'
4+
s.summary = 'A comprehensive Swift SDK providing developer tools and utilities'
65
s.description = <<-DESC
7-
SwiftDevKit provides an extensive collection of developer utilities with a focus on performance,
8-
ease of use, and Swift-first design. It brings the power of web-based developer tools natively to Swift.
6+
SwiftDevKit is your Swiss Army knife for Swift development, offering a wide range of functionalities:
7+
- Text Processing and String Manipulation
8+
- Time and TimeZone Utilities
9+
- Color Conversion Tools
10+
- Number Formatting
11+
- Date Conversion
12+
All designed with a focus on performance, safety, and ease of use.
913
DESC
1014

1115
s.homepage = 'https://github.com/owdax/SwiftDevKit'
1216
s.license = { :type => 'MIT', :file => 'LICENSE' }
13-
s.author = { 'owdax' => 'github.com/owdax' }
14-
s.source = { :git => 'https://github.com/owdax/SwiftDevKit.git', :tag => s.version.to_s }
17+
s.author = { 'owdax' => '[email protected]' }
18+
s.source = { :git => 'https://github.com/owdax/SwiftDevKit.git', :tag => "v#{s.version}" }
19+
s.social_media_url = 'https://twitter.com/owdax'
1520

16-
s.ios.deployment_target = '13.0'
17-
s.osx.deployment_target = '10.15'
18-
s.tvos.deployment_target = '13.0'
19-
s.watchos.deployment_target = '6.0'
21+
s.ios.deployment_target = '16.0'
22+
s.osx.deployment_target = '13.0'
23+
s.tvos.deployment_target = '16.0'
24+
s.watchos.deployment_target = '9.0'
25+
26+
s.swift_versions = ['6.0']
27+
28+
s.source_files = 'Sources/SwiftDevKit/**/*'
29+
s.exclude_files = 'Sources/SwiftDevKit/Documentation.docc/**/*'
2030

21-
s.swift_version = '5.9'
22-
s.source_files = 'Sources/**/*'
31+
s.resource_bundles = {
32+
'SwiftDevKit' => ['Sources/SwiftDevKit/Resources/**/*']
33+
}
2334

24-
# Dependencies will be added here as needed
25-
# s.dependency 'SomePackage'
35+
s.frameworks = 'Foundation'
36+
s.test_spec 'Tests' do |test_spec|
37+
test_spec.source_files = 'Tests/SwiftDevKitTests/**/*'
38+
end
2639

27-
# Any resources will be added here
28-
# s.resource_bundles = {
29-
# 'SwiftDevKit' => ['Sources/Resources/**/*']
30-
# }
40+
s.pod_target_xcconfig = {
41+
'SWIFT_VERSION' => '6.0',
42+
'OTHER_SWIFT_FLAGS' => '-DSWIFT_STRICT_CONCURRENCY'
43+
}
3144
end

0 commit comments

Comments
 (0)