-
Notifications
You must be signed in to change notification settings - Fork 0
94 lines (82 loc) · 3.73 KB
/
Copy pathrelease.yml
File metadata and controls
94 lines (82 loc) · 3.73 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: Release
on:
workflow_dispatch:
permissions:
contents: write
env:
JAVA_VERSION: '21'
JAVA_DISTRO: 'temurin'
jobs:
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: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_DISTRO }}
cache: maven
- name: Sync Harness Binaries
run: ./sync-harness.sh
- name: Release
env:
JRELEASER_MAVENCENTRAL_USERNAME: ${{ secrets.JRELEASER_MAVENCENTRAL_USERNAME }}
JRELEASER_MAVENCENTRAL_TOKEN: ${{ secrets.JRELEASER_MAVENCENTRAL_TOKEN }}
JRELEASER_GPG_PASSPHRASE: ${{ secrets.JRELEASER_GPG_PASSPHRASE }}
JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.JRELEASER_GPG_PUBLIC_KEY }}
JRELEASER_GPG_SECRET_KEY: ${{ secrets.JRELEASER_GPG_SECRET_KEY }}
JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global user.name "GitHub Action"
git config --global url."https://x-access-token:${GITHUB_TOKEN}@github.com/".insteadOf "git@github.com:"
./mvnw -ntp -B -Prelease release:prepare release:perform
- name: Verify Bundle Integrity
run: |
WRAPPER_JAR=$(find target/checkout/target/staging-deploy -name "antigravity-sdk-wrapper-*.jar" ! -name "*-sources.jar" ! -name "*-javadoc.jar" | head -n 1)
echo "Checking wrapper JAR: $WRAPPER_JAR"
if [ -z "$WRAPPER_JAR" ] || [ ! -f "$WRAPPER_JAR" ]; then
echo "ERROR: Wrapper JAR not found in target/checkout/target/staging-deploy!"
exit 1
fi
HARNESS_ALL_JAR=$(find target/checkout/target/staging-deploy -name "antigravity-sdk-harness-*-all.jar" | head -n 1)
echo "Checking harness all JAR: $HARNESS_ALL_JAR"
if [ -z "$HARNESS_ALL_JAR" ] || [ ! -f "$HARNESS_ALL_JAR" ]; then
echo "ERROR: Harness all JAR not found in target/checkout/target/staging-deploy!"
exit 1
fi
HARNESS_SIZE=$(wc -c < "$HARNESS_ALL_JAR" | tr -d ' ')
echo "Harness all JAR size: $HARNESS_SIZE bytes"
if [ "$HARNESS_SIZE" -lt 50000000 ]; then
echo "ERROR: antigravity-sdk-harness all JAR is smaller than 50MB ($HARNESS_SIZE bytes). Embedded Go harness binaries appear to be missing!"
exit 1
fi
jar tf "$HARNESS_ALL_JAR" | grep "google/antigravity/bin/" || {
echo "ERROR: google/antigravity/bin/ missing from harness all JAR!"
exit 1
}
echo "Verified: Wrapper and platform harness deliverables are intact."
- name: Publish with JReleaser
env:
JRELEASER_MAVENCENTRAL_USERNAME: ${{ secrets.JRELEASER_MAVENCENTRAL_USERNAME }}
JRELEASER_MAVENCENTRAL_TOKEN: ${{ secrets.JRELEASER_MAVENCENTRAL_TOKEN }}
JRELEASER_GPG_PASSPHRASE: ${{ secrets.JRELEASER_GPG_PASSPHRASE }}
JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.JRELEASER_GPG_PUBLIC_KEY }}
JRELEASER_GPG_SECRET_KEY: ${{ secrets.JRELEASER_GPG_SECRET_KEY }}
JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd target/checkout
./mvnw -ntp -B -Ppublication -N jreleaser:full-release
- name: JReleaser output
if: always()
uses: actions/upload-artifact@v5
with:
name: jreleaser-release
path: |
target/checkout/target/jreleaser/trace.log
target/checkout/target/jreleaser/output.properties