Skip to content

Commit 86762b9

Browse files
authored
Just use git tag for releasing a new version (#558)
* Add 0.8.23 release notes * Update release steps * Fix build.sbt
1 parent 7c3b6e5 commit 86762b9

File tree

5 files changed

+36
-19
lines changed

5 files changed

+36
-19
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: Release to Sonatype
22

33
on:
44
push:
5+
branches: [develop, main]
56
tags:
67
- v*
78
workflow_dispatch:

README.md

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,17 +85,18 @@ Here is a list of sbt commands for daily development:
8585
> publishLocal # Install to local .ivy2 repository
8686
> publishM2 # Install to local .m2 Maven repository
8787
> publish # Publishing a snapshot version to the Sonatype repository
88+
```
8889

89-
> release # Run the release procedure (set a new version, run tests, upload artifacts, then deploy to Sonatype)
90+
### Publish to Sonatype (Maven Central)
9091

91-
# [optional] When you need to perform the individual release steps manually, use the following commands:
92-
> publishSigned # Publish GPG signed artifacts to the Sonatype repository
93-
> sonatypeBundleRelease # Publish to the Maven Central (It will be synched within less than 4 hours)
94-
```
92+
To publish a new version, you only need to add a new git tag and push it to GitHub. GitHub Action will deploy a new release version to Maven Central (Sonatype).
9593

96-
Once you run a release command, a new git tag v(version number) will be pushed to GitHub. GitHub Action will deploy a new release version to Maven Central (Sonatype).
94+
```scala
95+
$ git tag v0.x.y
96+
$ git push origin v0.x.y
97+
```
9798

98-
For publishing to Maven central using a local machine, msgpack-java uses [sbt-sonatype](https://github.com/xerial/sbt-sonatype) plugin. Set Sonatype account information (user name and password) in the global sbt settings. To protect your password, never include this file in your project.
99+
If you need to publish to Maven central using a local machine, you need to configure [sbt-sonatype](https://github.com/xerial/sbt-sonatype) plugin. First set Sonatype account information (user name and password) in the global sbt settings. To protect your password, never include this file in your project.
99100

100101
___$HOME/.sbt/(sbt-version)/sonatype.sbt___
101102

@@ -106,6 +107,17 @@ credentials += Credentials("Sonatype Nexus Repository Manager",
106107
"(Sonatype password)")
107108
```
108109

110+
You may also need to configure GPG. See the instruction in [sbt-pgp](https://github.com/sbt/sbt-pgp).
111+
112+
Then, run `publishedSigned` followed by `sonatypeBundleRelease`:
113+
```
114+
# [optional] When you need to perform the individual release steps manually, use the following commands:
115+
> publishSigned # Publish GPG signed artifacts to the Sonatype repository
116+
> sonatypeBundleRelease # Publish to the Maven Central (It will be synched within less than 4 hours)
117+
```
118+
119+
If some sporadic error happens (e.g., Sonatype timeout), rerun `sonatypeBundleRelease` again.
120+
109121
### Project Structure
110122

111123
```

RELEASE_NOTES.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
# Release Notes
22

3+
## 0.8.23
4+
5+
* Produce stable map values [#548](https://github.com/msgpack/msgpac-java/pull/#548)
6+
* Fixes #544: Fix a bug in reading EXT32 of 2GB size [#545](https://github.com/msgpack/msgpac-java/pull/545)
7+
* Add a warning note for the usage of MessageUnpacker.readPayloadAsReference [#546](https://github.com/msgpack/msgpac-java/pull/546)
8+
9+
Intenral changes:
10+
* Add a script for releasing a new version of msgpack-java at CI
11+
* Publish a snapshot version for every main branch commit [#556](https://github.com/msgpack/msgpac-java/pull/556)
12+
* Use dynamic versioning with Git tags v0.x.y format [#555](https://github.com/msgpack/msgpac-java/pull/555)
13+
* Update ScalaTest and ScalaCheck versions [#554](https://github.com/msgpack/msgpac-java/pull/554)
14+
* Remove findbugs [#553](https://github.com/msgpack/msgpac-java/pull/553)
15+
* Update build settings to use latest version of sbt and plugins [#552](https://github.com/msgpack/msgpac-java/pull/552)
16+
* Run GitHub Actions for develop and main branches [#551](https://github.com/msgpack/msgpac-java/pull/551)
17+
* Remove Travis build [#550](https://github.com/msgpack/msgpac-java/pull/550)
18+
319
## 0.8.22
420
* Support extension type key in Map [#535](https://github.com/msgpack/msgpack-java/pull/535)
521
* Remove addTargetClass() and addTargetTypeReference() from ExtensionTypeCustomDeserializers [#539](https://github.com/msgpack/msgpack-java/pull/539)

build.sbt

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import ReleaseTransformations._
2-
31
Global / onChangedBuildSource := ReloadOnSourceChanges
42

53
// For performance testing, ensure each test run one-by-one
@@ -37,15 +35,6 @@ val buildSettings = Seq[Setting[_]](
3735
opts
3836
}
3937
},
40-
// Release settings
41-
releaseProcess := Seq[ReleaseStep](
42-
checkSnapshotDependencies,
43-
inquireVersions,
44-
runClean,
45-
runTest,
46-
tagRelease,
47-
pushChanges
48-
),
4938
// Add sonatype repository settings
5039
publishTo := sonatypePublishToBundle.value,
5140
// Style check config: (sbt-jchekcstyle)

project/plugins.sbt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
addSbtPlugin("com.github.sbt" % "sbt-release" % "1.0.15")
21
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.7")
32
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2")
43
// TODO: Fixes jacoco error:

0 commit comments

Comments
 (0)