Skip to content

Commit 347afbd

Browse files
switch to GHA
1 parent 20cfa1e commit 347afbd

2 files changed

Lines changed: 80 additions & 99 deletions

File tree

.circleci/config.yml

Lines changed: 0 additions & 99 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: ci
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- 'release-*'
8+
tags:
9+
- '[0-9]+.[0-9]+.[0-9]+*'
10+
pull_request:
11+
workflow_dispatch:
12+
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.ref }}
15+
cancel-in-progress: true
16+
17+
env:
18+
JAVA_TOOL_OPTIONS: -Xmx2g
19+
GRADLE_OPTS: -Dorg.gradle.daemon=false -Dorg.gradle.parallel=true -Dorg.gradle.workers.max=2
20+
21+
jobs:
22+
23+
build:
24+
runs-on: ubuntu-24.04
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v4
28+
- name: Setup Java and Gradle
29+
id: setup-java-gradle
30+
uses: ConsenSys/github-actions/java-setup-gradle@main
31+
- name: Build
32+
run: ./gradlew --no-daemon --parallel build sourcesJar
33+
- name: Upload test results
34+
uses: actions/upload-artifact@v4
35+
if: always()
36+
with:
37+
name: test-results
38+
path: build/test-results/
39+
if-no-files-found: ignore
40+
retention-days: 7
41+
- name: Upload build artifacts
42+
uses: actions/upload-artifact@v4
43+
with:
44+
name: build-libs
45+
path: build/libs/
46+
if-no-files-found: ignore
47+
retention-days: 7
48+
49+
publish:
50+
needs: build
51+
environment: publish
52+
runs-on: ubuntu-24.04
53+
if: |
54+
github.ref == 'refs/heads/master' ||
55+
startsWith(github.ref, 'refs/heads/release-') ||
56+
startsWith(github.ref, 'refs/tags/')
57+
steps:
58+
- name: Checkout
59+
uses: actions/checkout@v4
60+
- name: Set up Java 21
61+
uses: actions/setup-java@v4
62+
with:
63+
java-version: '21'
64+
distribution: 'temurin'
65+
- name: Restore gradle cache
66+
uses: actions/cache@v4
67+
with:
68+
path: |
69+
~/.gradle/caches
70+
~/.gradle/wrapper
71+
key: gradle-${{ hashFiles('build.gradle') }}-${{ github.ref }}-${{ github.sha }}
72+
restore-keys: |
73+
gradle-${{ hashFiles('build.gradle') }}-${{ github.ref }}-
74+
gradle-${{ hashFiles('build.gradle') }}-
75+
gradle-
76+
- name: Publish
77+
env:
78+
CLOUDSMITH_USER: ${{ secrets.CLOUDSMITH_USER }}
79+
CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }}
80+
run: ./gradlew --no-daemon --parallel publish

0 commit comments

Comments
 (0)