Skip to content

resolves #84 migrate to GitHub Actions #85

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "gradle"
directory: "/"
schedule:
interval: "daily"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
42 changes: 42 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: CI
on: [push, pull_request]
jobs:
test:
name: Test
if: "!startsWith(github.ref, 'refs/tags/')"
strategy:
matrix:
include:
- java: 8
- java: 11
- java: 15
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Java
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- name: Run tests
uses: eskatos/gradle-command-action@v1
with:
arguments: test
publish:
runs-on: ubuntu-latest
needs: [ test ]
if: github.repository == 'bozaro/git-as-svn' && github.event_name != 'pull_request' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/'))
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Java
uses: actions/setup-java@v1
with:
java-version: 8 # Build releases using oldest supported jdk
- name: Publish to Sonatype
uses: eskatos/gradle-command-action@v1
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
with:
arguments: publish closeAndReleaseRepository
46 changes: 0 additions & 46 deletions .travis.yml

This file was deleted.

6 changes: 5 additions & 1 deletion README.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
= git-lfs-java
:project-handle: git-lfs-java
:slug: bozaro/{project-handle}
:uri-project: https://github.com/{slug}
:uri-ci: {uri-project}/actions?query=branch%3Amaster

image:https://travis-ci.org/bozaro/git-lfs-java.svg?branch=master[Build Status,link=https://travis-ci.org/bozaro/git-lfs-java]
image:{uri-project}/workflows/CI/badge.svg?branch=master[Build Status,link={uri-ci}]
image:https://img.shields.io/maven-central/v/ru.bozaro.gitlfs/gitlfs-common.svg[Maven Central,link=http://mvnrepository.com/artifact/ru.bozaro.gitlfs]

== What is this?
Expand Down
22 changes: 4 additions & 18 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import de.marcphilipp.gradle.nexus.NexusPublishExtension
import org.ajoberstar.grgit.Grgit
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.plugins.ide.idea.model.IdeaLanguageLevel
import java.time.Duration

val ossrhUsername: String? = System.getenv("OSSRH_USERNAME")
val ossrhPassword: String? = System.getenv("OSSRH_PASSWORD")
val signingPassword: String? = System.getenv("SIGNING_PASSWORD")
val gitCommit = System.getenv("TRAVIS_COMMIT") ?: ""

tasks.wrapper {
gradleVersion = "6.8.1"
Expand All @@ -17,6 +16,7 @@ plugins {
id("com.github.ben-manes.versions") version "0.36.0"
id("de.marcphilipp.nexus-publish") version "0.4.0" apply false
id("io.codearte.nexus-staging") version "0.22.0"
id("org.ajoberstar.grgit") version "4.1.0"
idea
}

Expand All @@ -42,7 +42,6 @@ idea {
subprojects {
apply(plugin = "java-library")
apply(plugin = "maven-publish")
apply(plugin = "signing")
apply(plugin = "de.marcphilipp.nexus-publish")

configure<JavaPluginExtension> {
Expand Down Expand Up @@ -100,7 +99,7 @@ subprojects {
}

configure<NexusPublishExtension> {
// We're constantly getting socket timeouts on Travis
// We're constantly getting socket timeouts on CI
connectTimeout.set(Duration.ofMinutes(3))
clientTimeout.set(Duration.ofMinutes(3))

Expand Down Expand Up @@ -129,7 +128,7 @@ subprojects {

scm {
connection.set("scm:git:git://github.com/bozaro/git-lfs-java.git")
tag.set(gitCommit)
tag.set(Grgit.open(mapOf("dir" to rootDir)).head().id)
url.set("https://github.com/bozaro/git-lfs-java")
}

Expand Down Expand Up @@ -157,19 +156,6 @@ subprojects {
}
}
}

val secretKeyRingFile = "${rootProject.projectDir}/secring.gpg"
extra["signing.secretKeyRingFile"] = secretKeyRingFile
extra["signing.keyId"] = "4B49488E"
extra["signing.password"] = signingPassword

configure<SigningExtension> {
isRequired = signingPassword != null && file(secretKeyRingFile).exists() && !project.version.toString().endsWith("-SNAPSHOT")

// TODO: Is it possible to access publishing extension in a safer way?
val publishing: PublishingExtension by project.extensions
sign(publishing.publications)
}
}

tasks.closeRepository.configure {
Expand Down
Binary file removed secring.gpg.enc
Binary file not shown.