-
Notifications
You must be signed in to change notification settings - Fork 4
67 lines (59 loc) · 2.18 KB
/
release.yml
File metadata and controls
67 lines (59 loc) · 2.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Release
on:
workflow_dispatch:
inputs:
version:
description: 'Release version'
required: true
dry-run:
description: 'Dry run'
type: boolean
required: true
default: false
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Setup Java
uses: actions/setup-java@v5
with:
java-version: '25'
distribution: 'zulu'
- name: Cache Gradle
uses: actions/cache@v4
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle-
- name: Build
run: ./gradlew build
env:
GH_PACKAGES_READ_TOKEN: ${{ secrets.GH_PACKAGES_READ_TOKEN }}
GH_PACKAGES_WRITE_TOKEN: ${{ secrets.GH_PACKAGES_WRITE_TOKEN }}
IPREGISTRY_API_KEY: ${{ secrets.IPREGISTRY_API_KEY }}
IPREGISTRY_DATASETS_SECRET_KEY: ${{ secrets.IPREGISTRY_DATASETS_SECRET_KEY }}
- name: Publish artifacts to staging
run: ./gradlew publish
- name: Deploy to Maven Central and Create GitHub Release
env:
JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JRELEASER_MAVENCENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
JRELEASER_MAVENCENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
JRELEASER_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
JRELEASER_GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }}
JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.GPG_PUBLIC_KEY }}
run: |
mkdir -p build/jreleaser
echo "=== Staging directory contents ==="
find build/staging-deploy -type f -ls || echo "No staging directory found"
echo "=== Running JReleaser Deploy ==="
./gradlew jreleaserDeploy --stacktrace ${{ inputs.dry-run && '--dryrun' || '' }} || {
echo "=== JReleaser failed, checking logs ==="
find build/jreleaser -name "*.log" -exec cat {} \; || echo "No log files found"
exit 1
}