-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: Prepare for first release (#7)
* build: Prepare for first release Co-authored-by: francisco <franciscolopezsancho@gmail.com>
- Loading branch information
1 parent
b29cc8d
commit a2f272e
Showing
10 changed files
with
172 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: Publish | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: ["*"] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
sbt: | ||
name: sbt publish | ||
runs-on: ubuntu-22.04 | ||
if: github.repository == 'akka/akka-diagnostics' | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3.1.0 | ||
with: | ||
# we don't know what commit the last tag was it's safer to get entire repo so previousStableVersion resolves | ||
fetch-depth: 0 | ||
|
||
- name: Cache Coursier cache | ||
uses: coursier/cache-action@v6.4.0 | ||
|
||
- name: Set up JDK 8 | ||
uses: coursier/setup-action@v1.3.0 | ||
with: | ||
jvm: adopt:1.8.0-275 | ||
|
||
- name: Publish | ||
run: |- | ||
cp .jvmopts-ci .jvmopts | ||
sbt ci-release | ||
env: | ||
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} | ||
PGP_SECRET: ${{ secrets.PGP_SECRET }} | ||
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | ||
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | ||
|
||
documentation: | ||
name: Documentation | ||
runs-on: ubuntu-22.04 | ||
if: github.repository == 'akka/akka-diagnostics' | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3.1.0 | ||
with: | ||
# we don't know what commit the last tag was it's safer to get entire repo so previousStableVersion resolves | ||
fetch-depth: 0 | ||
|
||
- name: Cache Coursier cache | ||
uses: coursier/cache-action@v6.4.0 | ||
|
||
- name: Set up JDK 11 | ||
uses: coursier/setup-action@v1.3.0 | ||
with: | ||
jvm: temurin:1.11.0 | ||
|
||
- name: Publish API and reference documentation | ||
run: |- | ||
eval "$(ssh-agent -s)" | ||
echo $SCP_SECRET | base64 -d > /tmp/id_rsa | ||
chmod 600 /tmp/id_rsa | ||
ssh-add /tmp/id_rsa | ||
cp .jvmopts-ci .jvmopts | ||
sbt docs/publishRsync | ||
env: | ||
SCP_SECRET: ${{ secrets.SCP_SECRET }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Releasing | ||
|
||
## How to release | ||
|
||
Create a new issue from the [Release Train Issue Template](docs/release-train-issue-template.md): | ||
|
||
``` | ||
$ sh ./scripts/create-release-issue.sh 0.x.y | ||
``` | ||
|
||
### Releasing only updated docs | ||
|
||
It is possible to release a revised documentation to the already existing release. | ||
|
||
1. Create a new branch from a release tag. If a revised documentation is for the `v0.3` release, then the name of the new branch should be `docs/v0.3`. | ||
1. Add and commit `version.sbt` file that pins the version to the one, that is being revised. Also set `isSnapshot` to `false` for the stable documentation links. For example: | ||
```scala | ||
ThisBuild / version := "0.6.1" | ||
ThisBuild / isSnapshot := false | ||
``` | ||
1. Make all of the required changes to the documentation. | ||
1. Build documentation locally with: | ||
```sh | ||
sbt docs/previewSite | ||
``` | ||
1. If the generated documentation looks good, send it to Gustav: | ||
```sh | ||
rm -r docs/target/site | ||
sbt docs/publishRsync | ||
``` | ||
1. Do not forget to push the new branch back to GitHub. | ||
|
||
## Snapshots | ||
|
||
If you want to test an improvement that is not yet released, you can use a | ||
snapshot version: we release all commits to main to the snapshot repository | ||
on [Sonatype](https://oss.sonatype.org/content/repositories/snapshots/com/lightbend/akka/akka-diagnostics). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* | ||
* Copyright (C) 2016-2022 Lightbend Inc. <https://www.lightbend.com> | ||
*/ | ||
package akka | ||
|
||
import sbt.Keys._ | ||
import sbt.Def | ||
import sbt._ | ||
|
||
/** | ||
* Helper to set Automatic-Module-Name in projects. | ||
* | ||
* !! DO NOT BE TEMPTED INTO AUTOMATICALLY DERIVING THE NAMES FROM PROJECT NAMES !! | ||
* | ||
* The names carry a lot of implications and DO NOT have to always align 1:1 with the group ids or package names, though | ||
* there should be of course a strong relationship between them. | ||
*/ | ||
object AutomaticModuleName { | ||
private val AutomaticModuleName = "Automatic-Module-Name" | ||
|
||
def settings(name: String): Seq[Def.Setting[Task[Seq[PackageOption]]]] = | ||
Seq(Compile / packageBin / packageOptions += Package.ManifestAttributes(AutomaticModuleName -> name)) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
|
||
VERSION=$1 | ||
if [ -z $VERSION ] | ||
then | ||
echo specify the version name to be released, eg. 1.0.0 | ||
else | ||
sed -e 's/\$VERSION\$/'$VERSION'/g' docs/release-train-issue-template.md > /tmp/release-$VERSION.md | ||
echo Created $(gh issue create --title "Release $VERSION" --body-file /tmp/release-$VERSION.md --milestone $VERSION --web) | ||
fi |