-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
274 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v[0-9]+.[0-9]+.[0-9]+" | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Set version | ||
id: version | ||
run: | | ||
VERSION=$(echo ${{ github.ref }} | sed -e "s#refs/tags/v##g") | ||
echo ::set-output name=version::${VERSION} | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up JDK 1.8 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
|
||
- name: Cache Gradle packages | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.gradle/caches | ||
~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
- name: Create containers | ||
run: gradle docker | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.CR_PAT }} | ||
|
||
- name: Push containers | ||
run: | | ||
docker push ghcr.io/scalar-labs/scalardb-server:${{ steps.version.outputs.version }} | ||
- name: Upload scalardb, scalardb-server, and scalardb-rpc to Maven Central Repository | ||
run: | | ||
echo "${{secrets.SIGNING_SECRET_KEY_RING}}" | base64 -d > ~/.gradle/secring.gpg | ||
gradle uploadArchives \ | ||
-Pversion=${{ steps.version.outputs.version }} \ | ||
-Psigning.keyId="${{ secrets.SIGNING_KEY_ID }}" \ | ||
-P'signing.password'="${{ secrets.SIGNING_PASSWORD }}" \ | ||
-Psigning.secretKeyRingFile="$(echo ~/.gradle/secring.gpg)" \ | ||
-PossrhUsername="${{ secrets.OSSRH_USERNAMAE }}" \ | ||
-PossrhPassword="${{ secrets.OSSRH_PASSWORD }}" | ||
- name: Create release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: ${{ github.ref }} | ||
draft: true | ||
prerelease: false | ||
|
||
- name: Build scalardb-server zip | ||
run: gradle :server:distZip | ||
|
||
- name: Upload scalardb-server zip | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: server/build/distributions/scalardb-server-${{ steps.version.outputs.version }}.zip | ||
asset_name: scalardb-server-${{ steps.version.outputs.version }}.zip | ||
asset_content_type: application/zip | ||
|
||
- name: Cleanup Gradle cache | ||
# Remove some files from the Gradle cache, so they aren't cached by GitHub Actions. | ||
# Restoring these files from a GitHub Actions cache might cause problems for future builds. | ||
run: | | ||
rm -f ~/.gradle/caches/modules-2/modules-2.lock | ||
rm -f ~/.gradle/caches/modules-2/gc.properties |
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 |
---|---|---|
|
@@ -2,13 +2,19 @@ apply plugin: 'maven' | |
apply plugin: 'signing' | ||
|
||
artifacts { | ||
archives javadocJar, sourcesJar, testJar | ||
archives javadocJar, sourcesJar, testJar, testSourcesJar | ||
} | ||
|
||
signing { | ||
sign configurations.archives | ||
} | ||
|
||
configurations.archives.artifacts.removeAll { | ||
// exclude from the archives configuration all artifacts that were generated by distZip & distTar | ||
def depTasks = it.getBuildDependencies().getDependencies() | ||
depTasks.contains(distZip) || depTasks.contains(distTar) | ||
} | ||
|
||
uploadArchives { | ||
repositories { | ||
mavenDeployer { | ||
|
@@ -25,7 +31,7 @@ uploadArchives { | |
pom.project { | ||
name 'Scalar DB' | ||
packaging 'jar' | ||
// optionally artifactId can be defined here | ||
// optionally artifactId can be defined here | ||
description 'A library that makes non-ACID distributed databases/storages ACID-compliant.' | ||
url 'https://github.com/scalar-labs/scalardb' | ||
|
||
|
@@ -48,6 +54,11 @@ uploadArchives { | |
name 'Hiroyuki Yamada' | ||
email '[email protected]' | ||
} | ||
developer { | ||
id 'brfrn169' | ||
name 'Toshihiro Suzuki' | ||
email '[email protected]' | ||
} | ||
} | ||
} | ||
} | ||
|
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,66 @@ | ||
apply plugin: 'maven' | ||
apply plugin: 'signing' | ||
|
||
artifacts { | ||
archives javadocJar, sourcesJar, testJar, testSourcesJar | ||
} | ||
|
||
signing { | ||
sign configurations.archives | ||
} | ||
|
||
configurations.archives.artifacts.removeAll { | ||
// exclude from the archives configuration all artifacts that were generated by distZip & distTar | ||
def depTasks = it.getBuildDependencies().getDependencies() | ||
depTasks.contains(distZip) || depTasks.contains(distTar) | ||
} | ||
|
||
uploadArchives { | ||
repositories { | ||
mavenDeployer { | ||
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } | ||
|
||
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") { | ||
authentication(userName: ossrhUsername, password: ossrhPassword) | ||
} | ||
|
||
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") { | ||
authentication(userName: ossrhUsername, password: ossrhPassword) | ||
} | ||
|
||
pom.project { | ||
name 'Scalar DB RPC' | ||
packaging 'jar' | ||
// optionally artifactId can be defined here | ||
description 'Scalar DB RPC libraries' | ||
url 'https://github.com/scalar-labs/scalardb' | ||
|
||
scm { | ||
connection 'scm:git:https://github.com/scalar-labs/scalardb.git' | ||
developerConnection 'scm:git:https://github.com/scalar-labs/scalardb.git' | ||
url 'https://github.com/scalar-labs/scalardb' | ||
} | ||
|
||
licenses { | ||
license { | ||
name 'Apache License, Version 2.0' | ||
url 'http://www.apache.org/licenses/LICENSE-2.0' | ||
} | ||
} | ||
|
||
developers { | ||
developer { | ||
id 'hiroyuki' | ||
name 'Hiroyuki Yamada' | ||
email '[email protected]' | ||
} | ||
developer { | ||
id 'brfrn169' | ||
name 'Toshihiro Suzuki' | ||
email '[email protected]' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
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,66 @@ | ||
apply plugin: 'maven' | ||
apply plugin: 'signing' | ||
|
||
artifacts { | ||
archives javadocJar, sourcesJar, testJar, testSourcesJar | ||
} | ||
|
||
signing { | ||
sign configurations.archives | ||
} | ||
|
||
configurations.archives.artifacts.removeAll { | ||
// exclude from the archives configuration all artifacts that were generated by distZip & distTar | ||
def depTasks = it.getBuildDependencies().getDependencies() | ||
depTasks.contains(distZip) || depTasks.contains(distTar) | ||
} | ||
|
||
uploadArchives { | ||
repositories { | ||
mavenDeployer { | ||
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } | ||
|
||
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") { | ||
authentication(userName: ossrhUsername, password: ossrhPassword) | ||
} | ||
|
||
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") { | ||
authentication(userName: ossrhUsername, password: ossrhPassword) | ||
} | ||
|
||
pom.project { | ||
name 'Scalar DB Server' | ||
packaging 'jar' | ||
// optionally artifactId can be defined here | ||
description 'Scalar DB Server that is the gRPC interfarce of Scalar DB' | ||
url 'https://github.com/scalar-labs/scalardb' | ||
|
||
scm { | ||
connection 'scm:git:https://github.com/scalar-labs/scalardb.git' | ||
developerConnection 'scm:git:https://github.com/scalar-labs/scalardb.git' | ||
url 'https://github.com/scalar-labs/scalardb' | ||
} | ||
|
||
licenses { | ||
license { | ||
name 'Apache License, Version 2.0' | ||
url 'http://www.apache.org/licenses/LICENSE-2.0' | ||
} | ||
} | ||
|
||
developers { | ||
developer { | ||
id 'hiroyuki' | ||
name 'Hiroyuki Yamada' | ||
email '[email protected]' | ||
} | ||
developer { | ||
id 'brfrn169' | ||
name 'Toshihiro Suzuki' | ||
email '[email protected]' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
rootProject.name = 'scalardb' | ||
include 'core' | ||
include 'rpc' | ||
include 'server' |
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