Skip to content

Commit a631138

Browse files
committed
wip
Signed-off-by: Dmitry Dygalo <[email protected]>
1 parent 2b53210 commit a631138

File tree

1 file changed

+14
-22
lines changed

1 file changed

+14
-22
lines changed

.github/workflows/java-release.yml

Lines changed: 14 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ jobs:
5050
with:
5151
targets: ${{ matrix.target }}
5252

53+
- uses: Swatinem/rust-cache@v2
54+
with:
55+
workspaces: |
56+
css-inline
57+
bindings/java
58+
5359
- name: Build native library
5460
working-directory: bindings/java
5561
run: cargo build --release --target ${{ matrix.target }}
@@ -133,24 +139,17 @@ jobs:
133139
import org.cssinline.CssInline;
134140
public class Test {
135141
public static void main(String[] args) {
136-
try {
137-
String html = "<html><head><style>h1{color:red}</style></head><body><h1>Test</h1></body></html>";
138-
String result = CssInline.inline(html);
139-
if (!result.contains("style=\"color: red;\"")) {
140-
System.err.println("Expected inlined style not found in: " + result);
141-
System.exit(1);
142-
}
143-
System.out.println("✓ Integration test passed on ${{ matrix.platform }}");
144-
} catch (Exception e) {
145-
System.err.println("Integration test failed: " + e.getMessage());
146-
e.printStackTrace();
147-
System.exit(1);
142+
String html = "<html><head><style>h1{color:red}</style></head><body><h1>Test</h1></body></html>";
143+
String result = CssInline.inline(html);
144+
if (!result.contains("style=\"color: red;\"")) {
145+
throw new RuntimeException("Expected inlined style not found in: " + result);
148146
}
147+
System.out.println("✓ Integration test passed on ${{ matrix.platform }}");
149148
}
150149
}
151150
EOF
152151
153-
JAR_FILE=$(ls css-inline-*-SNAPSHOT.jar | grep -v sources | grep -v javadoc)
152+
JAR_FILE=$(ls *.jar)
154153
155154
if [[ "$RUNNER_OS" == "Windows" ]]; then
156155
CLASSPATH_SEP=";"
@@ -182,24 +181,17 @@ jobs:
182181
uses: actions/download-artifact@v4
183182
with:
184183
name: java-jar
185-
path: build/libs
184+
path: bindings/java/build/libs
186185

187186
- name: Extract version
188187
run: echo "version=${GITHUB_REF#refs/tags/java-v}" >> $GITHUB_ENV
189188

190189
- name: Publish to GitHub Packages
191190
working-directory: bindings/java
192-
run: |
193-
# Copy the pre-built JAR to the expected location
194-
mkdir -p build/libs
195-
cp ../../build/libs/*.jar build/libs/
196-
197-
# Publish using the existing JAR
198-
gradle publish -Pversion=${{ env.version }}
191+
run: gradle publish -Pversion=${{ env.version }}
199192
env:
200193
GITHUB_ACTOR: ${{ github.actor }}
201194
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
202-
VERSION: ${{ env.version }}
203195

204196
release:
205197
name: Create GitHub Release

0 commit comments

Comments
 (0)