-
Notifications
You must be signed in to change notification settings - Fork 21
136 lines (120 loc) · 4.26 KB
/
early-access.yml
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
#
# SPDX-License-Identifier: Apache-2.0
# Copyright (c) The original authors
#
# Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
#
name: Early Access
on:
push:
branches: [ main ]
env:
JAVA_VERSION: '21'
JAVA_DISTRO: 'zulu'
GRAAL_VERSION: '21.0.1'
GRAAL_DISTRIBUTION: 'graalvm-community'
jobs:
build-distribution:
if: github.repository == 'streamthoughts/jikkou'
name: 'Build with GraalVM on ${{ matrix.os }}'
strategy:
fail-fast: true
matrix:
os: [ ubuntu-latest, macOS-latest, macOS-12, windows-latest ]
setup: [ graalvm ]
include:
- os: ubuntu-latest
setup: java
runs-on: ${{ matrix.os }}
steps:
- name: 'Checkout GitHub repository'
uses: actions/checkout@v4
with:
fetch-depth: 0
clean: true
- name: 'Add Developer Command Prompt for Microsoft Visual C++'
if: ${{ runner.os == 'Windows' }}
uses: ilammy/msvc-dev-cmd@v1
- name: 'Set up GraalVM'
if: ${{ matrix.setup == 'graalvm' }}
uses: graalvm/setup-graalvm@v1
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.GRAAL_DISTRIBUTION }}
github-token: ${{ secrets.GITHUB_TOKEN }}
native-image-job-reports: 'true'
- name: 'Set up Java'
if: ${{ matrix.setup == 'java' }}
uses: actions/setup-java@v4
with:
distribution: ${{ env.JAVA_DISTRO }}
java-version: ${{ env.JAVA_VERSION }}
- name: 'Build Native Image (Linux)'
if: ${{ runner.os == 'Linux' && matrix.setup == 'graalvm' }}
run: |
./mvnw -ntp -B --file pom.xml -Pnative package
- name: 'Build Native Image (macOS)'
if: ${{ runner.os == 'macOS' && matrix.setup == 'graalvm' }}
run: |
./mvnw -ntp -B --file pom.xml -Pnative package "-DskipTests"
- name: 'Build Native Image (Windows)'
if: ${{ runner.os == 'windows' && matrix.setup == 'graalvm' }}
run: |
./mvnw -ntp -B --file pom.xml -Pnative package "-DskipTests"
- name: 'Build Debian Package (Linux)'
if: ${{ runner.os == 'Linux' && matrix.setup == 'graalvm' }}
run: |
./mvnw -ntp -B --file pom.xml -Pdeb package -DskipTests
- name: 'Build Distribution'
if: ${{ runner.os == 'Linux' && matrix.setup == 'java' }}
run: |
./mvnw -ntp -B --file pom.xml -Pdist package -DskipTests
- name: 'Upload build artifact'
uses: actions/upload-artifact@v4
with:
name: artifacts-${{ runner.os }}-${{ runner.arch }}-${{ matrix.setup }}
path: |
dist/*.zip
dist/*.tar.gz
dist/*.deb
dist/*.rpm
release-artifacts:
needs: [ build-distribution ]
runs-on: ubuntu-latest
steps:
- name: 'Checkout GitHub repository'
uses: actions/checkout@v4
with:
ref: ${{ needs.set-release-version.outputs.HEAD }}
fetch-depth: 0
- name: 'Download all artifacts'
uses: actions/download-artifact@v4
with:
path: artifacts
pattern: artifacts-*
merge-multiple: true
- name: 'Set up Java'
uses: actions/setup-java@v4
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_DISTRO }}
cache: maven
- name: 'Configure Git'
run: |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
- name: 'Release with JReleaser'
env:
JRELEASER_GITHUB_TOKEN: ${{ secrets.PAT }}
JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.GPG_PUBLIC_KEY }}
JRELEASER_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
JRELEASER_GPG_SECRET_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
run: ./mvnw -ntp -B --file ./cli/pom.xml -Prelease -DartifactsDir=artifacts jreleaser:full-release
- name: 'JReleaser output'
if: always()
uses: actions/upload-artifact@v4
with:
name: jreleaser-logs
path: |
target/jreleaser/trace.log
target/jreleaser/output.properties