Skip to content

Commit 4fd6492

Browse files
committed
GitHub Actions test
1 parent 99ca15d commit 4fd6492

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Build and deploy tools
2+
run-name: Build and deploy tools
3+
on: [push]
4+
jobs:
5+
build-deploy-tools:
6+
runs-on: ubuntu-latest
7+
permissions:
8+
pull-requests: read
9+
steps:
10+
- name: Check out repository code
11+
uses: actions/checkout@v4
12+
- name: Get changed files
13+
id: changed-files
14+
uses: tj-actions/changed-files@v39
15+
- name: Refresh prebuilts if transitive deps changed in this PR
16+
id: refresh-prebuilts
17+
run: |
18+
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
19+
echo "$file was changed"
20+
label=$(bazel query "$file" || true)
21+
if [[ ! -z $label ]]; then
22+
bazel query "kind(java_binary, rdeps(//private/tools/java/..., $label))" >> /tmp/affected_targets.txt
23+
fi
24+
done
25+
affected_targets_count=$(wc -l < /tmp/affected_targets.txt)
26+
if [[ $affected_targets_count -gt 0 ]]; then
27+
bazelisk build //scripts:refresh-prebuilts
28+
fi
29+
- name: Upload Artifact
30+
if: steps.refresh-prebuilts.outcome == 'success'
31+
uses: actions/upload-artifact@v3
32+
with:
33+
name: deploy jars
34+
path: bazel-bin/private/tools/java/com/github/bazelbuild/rules_jvm_external/**/*_deploy.jar
35+
retention-days: 5

private/tools/java/com/github/bazelbuild/rules_jvm_external/Coordinates.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ public Coordinates(String coordinates) {
2828
groupId = Objects.requireNonNull(parts[0]);
2929
artifactId = Objects.requireNonNull(parts[1]);
3030

31+
3132
if (parts.length == 2) {
3233
extension = "jar";
3334
classifier = "";

0 commit comments

Comments
 (0)