Skip to content

Commit

Permalink
Migrate to Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ogolberg authored Apr 7, 2024
1 parent f013670 commit 1a426c4
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 75 deletions.
75 changes: 0 additions & 75 deletions .circleci/config.yml

This file was deleted.

10 changes: 10 additions & 0 deletions .github/actions/gradle-cache/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Gradle cache
runs:
using: composite
steps:
- uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: gradle-${{ hashFiles('gradle/libs.versions.toml', 'gradle/wrapper/gradle-wrapper.properties') }}
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@ updates:
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
25 changes: 25 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Build

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/gradle-cache
- name: Set up java
uses: actions/setup-java@v4
with:
distribution: corretto
java-version: 17
- name: Build
run: ./gradlew check --stacktrace --no-daemon
- name: Publish locally
run: ./gradlew publishToMavenLocal --stacktrace --no-daemon
27 changes: 27 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Release

on:
push:
tags: [ '[0-9]+.[0-9]+.[0-9]+' ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/gradle-cache
- name: Set up java
uses: actions/setup-java@v4
with:
distribution: corretto
java-version: 17
- name: Publish
run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository --stacktrace --no-daemon
env:
PGP_KEY: ${{ secrets.PGP_KEY }}
PGP_PASSWORD: ${{ secrets.PGP_PASSWORD }}
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
GRADLE_OPTS: "-Dorg.gradle.daemon=false -Dorg.gradle.internal.http.socketTimeout=120000 -Dorg.gradle.internal.network.retry.max.attempts=1 -Dorg.gradle.internal.publish.checksums.insecure=true"

0 comments on commit 1a426c4

Please sign in to comment.