graphql-java-codegen icon indicating copy to clipboard operation
graphql-java-codegen copied to clipboard

Automatically publish when the master is built successfully.

Open jxnu-liguobin opened this issue 5 years ago • 6 comments

I guess the problem here is the change of the version number of the example projects.

I forgot to release 4.1.2 and 4.1.3. I just released 4.1.3. 😅

jxnu-liguobin avatar Feb 25 '21 12:02 jxnu-liguobin

Working on a script right now to update versions to release version (and to -SNASHOT version as well) all over the project. Also will change the GitHub Actions workflow: So that once a new code to develop branch will be merged and we decide that library should be released, then just create a PR from develop to master and release will be performed automatically.

@jxnu-liguobin But I will need your help on how to automatically release sbt plugin.

kobylynskyi avatar Mar 04 '21 02:03 kobylynskyi

Working on a script right now to update versions to release version (and to -SNASHOT version as well) all over the project. Also will change the GitHub Actions workflow: So that once a new code to develop branch will be merged and we decide that library should be released, then just create a PR from develop to master and release will be performed automatically.

@jxnu-liguobin But I will need your help on how to automatically release sbt plugin.

SBT only needs to execute sbt release .But I don't know how the dependency of the example project can be modified automatically. Can Maven automatically modify the POM of the example project?

jxnu-liguobin avatar Mar 04 '21 03:03 jxnu-liguobin

    releaseProcess := Seq[ReleaseStep](
      checkSnapshotDependencies,
      inquireVersions,
      runClean,
      releaseStepCommandAndRemaining("^ scripted"),
      setReleaseVersion,
      commitReleaseVersion,
      tagRelease,
      releaseStepCommandAndRemaining("^ publishSigned"),
      setNextVersion, //This is a problem. If you need to make the master keep the next SNAPSHOT version. What about modifying the version in the example?
      commitNextVersion,
      pushChanges
    ),

This is the step of publishing SBT, which needs to be consistent with Gradle/Maven. Some steps may have to be deleted. Use script global replacement? If so, I will modify the SBT configuration and remove these steps

jxnu-liguobin avatar Mar 04 '21 03:03 jxnu-liguobin

If I do sbt "release with-defaults" then it will automatically publish the plugin to artifactory? I think I will need to supply some sort of a token... that's how it is done in maven/gradle

kobylynskyi avatar Mar 04 '21 03:03 kobylynskyi

If I do sbt "release with-defaults" then it will automatically publish the plugin to artifactory? I think I will need to supply some sort of a token... that's how it is done in maven/gradle

Yes, also need to close the build on OSS and release it. Need user and password of OSS.

jxnu-liguobin avatar Mar 04 '21 03:03 jxnu-liguobin

sbt release with-defaults default-tag-exists-answer k

It has been tested. If release version is ready, this command will automatically publish and ignore the known tags. At the same time, the version of the next iteration will be incremented and published to OSS. It should be noted that the version of example will not be updated.

jxnu-liguobin avatar Mar 04 '21 03:03 jxnu-liguobin