ci: publish sshauthentication to GitHub Packages
This commit is contained in:
parent
5e22f99fe9
commit
5feb191fe1
|
@ -0,0 +1,28 @@
|
||||||
|
name: Publish package to GitHub Packages
|
||||||
|
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types: [created]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
publish:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
java_version: [1.8]
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
fetch-depth: 0 # 0 indicates all history
|
||||||
|
- name: Install JDK ${{ matrix.java_version }}
|
||||||
|
uses: actions/setup-java@v1
|
||||||
|
with:
|
||||||
|
java-version: ${{ matrix.java_version }}
|
||||||
|
- name: Install Android SDK
|
||||||
|
uses: malinskiy/action-android/install-sdk@release/0.1.0
|
||||||
|
- name: Publish sshauthentication-api
|
||||||
|
run: ./gradlew :sshauthentication-api:publish
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@ -7,8 +7,6 @@ buildscript {
|
||||||
dependencies {
|
dependencies {
|
||||||
// NOTE: Always use fixed version codes not dynamic ones, e.g. 0.7.3 instead of 0.7.+, see README for more information
|
// NOTE: Always use fixed version codes not dynamic ones, e.g. 0.7.3 instead of 0.7.+, see README for more information
|
||||||
classpath 'com.android.tools.build:gradle:4.1.2'
|
classpath 'com.android.tools.build:gradle:4.1.2'
|
||||||
// bintray dependency to satisfy dependency of openpgp-api lib
|
|
||||||
classpath 'com.novoda:bintray-release:0.8.0'
|
|
||||||
classpath 'com.squareup.sqldelight:gradle-plugin:0.8.0'
|
classpath 'com.squareup.sqldelight:gradle-plugin:0.8.0'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,8 +22,3 @@ dependencies {
|
||||||
compile 'org.sufficientlysecure:sshauthentication-api:1.0'
|
compile 'org.sufficientlysecure:sshauthentication-api:1.0'
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### Build library
|
|
||||||
1. Go to root dir of OpenKeychain repo
|
|
||||||
2. Build: ``./gradlew :sshauthentication-api:assemble``
|
|
||||||
2. Release on bintray: ``./gradlew :sshauthentication-api:bintrayUpload -PbintrayUser=sufficientlysecure -PbintrayKey=INSERT-KEY -PdryRun=false``
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
apply plugin: 'bintray-release' // must be applied after your artifact generating plugin (eg. java / com.android.library)
|
apply plugin: 'maven-publish'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
if (project.hasProperty('rootProject.ext.compileSdkVersion')) {
|
if (project.hasProperty('rootProject.ext.compileSdkVersion')) {
|
||||||
|
@ -12,8 +12,8 @@ android {
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion 14
|
minSdkVersion 14
|
||||||
targetSdkVersion 28
|
targetSdkVersion 28
|
||||||
versionCode 1
|
versionCode 2
|
||||||
versionName "1.0"
|
versionName "2.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do not abort build if lint finds errors
|
// Do not abort build if lint finds errors
|
||||||
|
@ -22,11 +22,43 @@ android {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
publish {
|
// https://developer.android.com/studio/build/maven-publish-plugin
|
||||||
userOrg = 'sufficientlysecure'
|
afterEvaluate {
|
||||||
groupId = 'org.sufficientlysecure'
|
publishing {
|
||||||
artifactId = 'sshauthentication-api'
|
publications {
|
||||||
version = '1.0'
|
release(MavenPublication) {
|
||||||
description = 'The SSH authentication API library provides an interface to using an external authentication provider, such as OpenKeychain, in the SSH authentication layer.'
|
from components.release
|
||||||
website = 'https://github.com/open-keychain/open-keychain'
|
|
||||||
|
groupId = 'org.sufficientlysecure'
|
||||||
|
artifactId = 'sshauthentication-api'
|
||||||
|
version = android.defaultConfig.versionName
|
||||||
|
|
||||||
|
pom {
|
||||||
|
url = 'https://github.com/open-keychain'
|
||||||
|
licenses {
|
||||||
|
license {
|
||||||
|
name = 'The Apache Software License, Version 2.0'
|
||||||
|
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
|
||||||
|
distribution = 'repo'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
organization {
|
||||||
|
name = 'Confidential Technologies GmbH'
|
||||||
|
url = 'https://www.cotech.de'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
maven {
|
||||||
|
name = "GitHubPackages"
|
||||||
|
url = "https://maven.pkg.github.com/open-keychain/open-keychain"
|
||||||
|
credentials {
|
||||||
|
username = System.getenv("GITHUB_ACTOR")
|
||||||
|
password = System.getenv("GITHUB_TOKEN")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue