-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (75 loc) · 2.61 KB
/
call-toolfetch-binary.yml
File metadata and controls
83 lines (75 loc) · 2.61 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
name: "Call: Assemble ToolFetch Binary"
on:
workflow_call:
inputs:
maven-repo-cache-key-prefix:
description: "Cache Key for Maven Repository. The key created when saving a cache and the key used to search for a cache"
required: false
type: string
default: "toolfetch-binary-m2-repo"
release-type:
description: "Release type"
required: false
type: string
default: "SNAPSHOT"
jobs:
toolfetch-binary:
timeout-minutes: 15
permissions:
contents: read
strategy:
fail-fast: false
matrix:
job:
- { runner: ubuntu-latest, platform: linux-amd64 }
- { runner: ubuntu-24.04-arm, platform: linux-arm64 }
name: "Assemble ToolFetch Binary • ${{ matrix.job.platform }}"
runs-on: ${{ matrix.job.runner }}
steps:
- name: "Checkout"
uses: actions/checkout@v6
with:
persist-credentials: false
- name: "Prepare"
uses: ./.github/actions/prepare
with:
maven-repo-cache-key: ${{ inputs.maven-repo-cache-key-prefix }}-${{ matrix.job.runner }}
install-syft: true
install-upx: true
release-type: ${{ inputs.release-type }}
- name: "Prepare Native Build"
working-directory: scripts
shell: bash
run: ./build.sh --native-prepare
- name: "Assemble ToolFetch Binary"
uses: jreleaser/release-action@v2
env:
JRELEASER_ASSEMBLE_NATIVE_IMAGE_TOOLFETCH_BINARY_ACTIVE: ALWAYS
with:
version: early-access # @Patch https://github.com/jreleaser/jreleaser/issues/2094
setup-java: false
arguments: assemble --output-directory=target
- name: "Upload ToolFetch Binary"
uses: actions/upload-artifact@v6
with:
name: toolfetch-binary-${{ matrix.job.platform }}
if-no-files-found: error
retention-days: 1
path: |
target/jreleaser/assemble/toolfetch_binary/native-image/toolfetch*${{ matrix.job.platform }}
- name: "Upload ToolFetch SBOM"
uses: actions/upload-artifact@v6
with:
name: toolfetch-sbom-${{ matrix.job.platform }}
if-no-files-found: error
retention-days: 1
path: |
target/jreleaser/sbom/*.spdx-json.sbom
- name: "Upload JReleaser output"
uses: actions/upload-artifact@v6
if: ${{ !cancelled() }}
with:
name: jreleaser-toolfetch-binary-${{ matrix.job.platform }}
path: |
target/jreleaser/trace.log
target/jreleaser/output.properties