Skip to content

Commit 2d8eaaa

Browse files
committed
automate github release
1 parent 6ff72a9 commit 2d8eaaa

File tree

4 files changed

+76
-1
lines changed

4 files changed

+76
-1
lines changed

.circleci/config.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ version: 2.1
22
orbs:
33
gradle: circleci/gradle@3.0.0
44
browser-tools: circleci/browser-tools@1.4.6
5+
github-cli: circleci/github-cli@2.7.0
56
_defaults: &defaults
67
working_directory: ~/code
78
environment:
@@ -118,13 +119,26 @@ jobs:
118119
<<: *image
119120
<<: *defaults
120121
steps:
122+
- github-cli/install
121123
- checkout
122124
- with_cache:
123125
cache_key: linux
124126
steps:
125127
- run:
126128
name: Close & Release
127129
command: ./gradlew findSonatypeStagingRepository closeSonatypeStagingRepository
130+
- run:
131+
name: Query Version
132+
command: |
133+
sed -nE 's/kotlin-inject *= *"([^"]+)"/v\1/p' gradle/libs.versions.toml > version.txt
134+
echo "export VERSION=\"$(cat version.txt)\"" >> "$BASH_ENV"
135+
- run:
136+
name: Publish Github Release
137+
command: |
138+
if [ ! "${VERSION}" == *"-SNAPSHOT" ]; then
139+
./gradlew -q getChangelog > RELEASE.md
140+
gh release create "${VERSION}" -F RELEASE.md
141+
fi
128142
workflows:
129143
version: 2
130144
build:

CHANGELOG.md

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
# Changelog
22

33
All notable changes to this project will be documented in this file.
4-
54
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
65
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
76

7+
## [Unreleased]
8+
89
## [0.7.2] 2024-09-13
910

1011
### Changed
12+
1113
- kotlin updated to 2.0.0
1214

1315
### Fixed
16+
1417
- Fixed various issues with qualifier annotations.
1518
- Fixed issue with inner class or companion inside a component extending the component interface causing an error.
1619
- Fixed crash when attempting to display a type parameter.
@@ -21,11 +24,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
2124
## [0.7.1] 2024-06-12
2225

2326
### Fixed
27+
2428
- Removed erroneous `@KmpComponentCreator` annotation.
2529

2630
## [0.7.0] 2024-06-12
2731

2832
### Changed
33+
2934
- `@Scope` annotations now take arguments into account. This means for example, if you have
3035
```kotlin
3136
@Scope
@@ -80,9 +85,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
8085
```
8186

8287
### Removed
88+
8389
- The KAPT backend is removed, please migrate to KSP if you haven't already.
8490
8591
### Fixed
92+
8693
- Fixed cases of invalid code generation (#321, #337, #313).
8794
- Fixed an exception thrown on KSP2 when running multiple rounds (google/ksp#1854).
8895
- Fixed various issues with handling method overrides in components (#309, #375)
@@ -91,6 +98,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
9198
## [0.6.3] 2023-09-02
9299
93100
### Fixed
101+
94102
- Fixed scoped assisted injection enforcement. It was incorrectly using the component scope instead of the scope of the
95103
assisted class or provides method.
96104
@@ -498,3 +506,49 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
498506
## [0.1.0] - 2020-09-17
499507

500508
- Initial Release
509+
510+
[Unreleased]: https://github.com/evant/kotlin-inject/compare/v0.7.3...HEAD
511+
512+
[0.7.3]: https://github.com/evant/kotlin-inject/compare/v0.7.2...v0.7.3
513+
514+
[0.7.2]: https://github.com/evant/kotlin-inject/compare/v0.7.1...v0.7.2
515+
516+
[0.7.1]: https://github.com/evant/kotlin-inject/compare/v0.7.0...v0.7.1
517+
518+
[0.7.0]: https://github.com/evant/kotlin-inject/compare/v0.6.3...v0.7.0
519+
520+
[0.6.3]: https://github.com/evant/kotlin-inject/compare/v0.6.2...v0.6.3
521+
522+
[0.6.2]: https://github.com/evant/kotlin-inject/compare/v0.6.1...v0.6.2
523+
524+
[0.6.1]: https://github.com/evant/kotlin-inject/compare/v0.6.0...v0.6.1
525+
526+
[0.6.0]: https://github.com/evant/kotlin-inject/compare/v0.5.1...v0.6.0
527+
528+
[0.5.1]: https://github.com/evant/kotlin-inject/compare/v0.5.0...v0.5.1
529+
530+
[0.5.0]: https://github.com/evant/kotlin-inject/compare/v0.4.1...v0.5.0
531+
532+
[0.4.1]: https://github.com/evant/kotlin-inject/compare/v0.4.0...v0.4.1
533+
534+
[0.4.0]: https://github.com/evant/kotlin-inject/compare/v0.3.7-RC...v0.4.0
535+
536+
[0.3.7-RC]: https://github.com/evant/kotlin-inject/compare/v0.3.6...v0.3.7-RC
537+
538+
[0.3.6]: https://github.com/evant/kotlin-inject/compare/v0.3.5...v0.3.6
539+
540+
[0.3.5]: https://github.com/evant/kotlin-inject/compare/v0.3.4...v0.3.5
541+
542+
[0.3.4]: https://github.com/evant/kotlin-inject/compare/v0.3.3...v0.3.4
543+
544+
[0.3.3]: https://github.com/evant/kotlin-inject/compare/v0.3.2...v0.3.3
545+
546+
[0.3.2]: https://github.com/evant/kotlin-inject/compare/v0.3.1...v0.3.2
547+
548+
[0.3.1]: https://github.com/evant/kotlin-inject/compare/v0.3.0...v0.3.1
549+
550+
[0.3.0]: https://github.com/evant/kotlin-inject/compare/v0.2.0...v0.3.0
551+
552+
[0.2.0]: https://github.com/evant/kotlin-inject/compare/v0.1.0...v0.2.0
553+
554+
[0.1.0]: https://github.com/evant/kotlin-inject/commits/v0.1.0

build.gradle.kts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ buildscript {
88
plugins {
99
alias(libs.plugins.ksp) apply false
1010
alias(libs.plugins.nexus.publish)
11+
alias(libs.plugins.changelog)
1112
base
1213
}
1314

@@ -20,6 +21,11 @@ nexusPublishing {
2021
}
2122
}
2223

24+
changelog {
25+
groups = emptyList()
26+
repositoryUrl = "https://github.com/evant/kotlin-inject"
27+
}
28+
2329
val testReport by tasks.registering(TestReport::class) {
2430
destinationDirectory = layout.buildDirectory.map { it.asFile.resolve("reports") }
2531
}

gradle/libs.versions.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,4 @@ kotlin-test-junit5 = ["junit5-api", "junit5-params", "kotlin-reflect"]
3838
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
3939
nexus-publish = { id = "io.github.gradle-nexus.publish-plugin", version = "2.0.0" }
4040
jmh = { id = "me.champeau.jmh", version = "0.6.6" }
41+
changelog = { id = "org.jetbrains.changelog", version = "2.2.1" }

0 commit comments

Comments
 (0)