-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (71 loc) · 2.45 KB
/
release.yaml
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
name: Release
on:
workflow_dispatch:
inputs:
version:
description: 'Release version'
required: true
env:
JAVA_VERSION: '21'
jobs:
build:
name: 'Build convert on ${{ matrix.os }}'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ ubuntu-latest, macos-latest, macos-13 ]
steps:
- name: 'Check out repository'
uses: actions/checkout@v4
- name: 'Setup GraalVM ${{ env.GRAAL_VERSION }}'
uses: graalvm/setup-graalvm@v1
with:
distribution: 'graalvm-community'
java-version: ${{ env.JAVA_VERSION }}
github-token: ${{ secrets.GITHUB_TOKEN }}
native-image-job-reports: 'true'
native-image-musl: ${{ matrix.os == 'ubuntu-latest' }}
cache: 'gradle'
- name: 'Check'
run: ./gradlew check -Pversion='${{ github.event.inputs.version }}' --no-daemon
- name: 'Build native executable'
run: ./gradlew nativeCompile -Pversion='${{ github.event.inputs.version }}' --no-daemon
- name: 'Compress with UPX'
if: ${{ runner.os == 'Linux' }}
uses: crazy-max/ghaction-upx@v3
with:
version: latest
files: |
./build/native/nativeCompile/convert
args: --best
- name: 'Add convert to PATH'
run: echo "${{ github.workspace }}/build/native/nativeCompile" >> $GITHUB_PATH
- name: 'End to end test'
run: ./gradlew e2e --no-daemon
- name: 'Generate package'
run: ./gradlew generatePackage -Pversion='${{ github.event.inputs.version }}' --no-daemon
- name: 'Upload build artifact'
uses: actions/upload-artifact@v4
with:
name: artifacts-${{ matrix.os }}
path: build/**/*.zip
release:
name: 'Release convert'
needs: [ build ]
runs-on: ubuntu-latest
steps:
- name: 'Check out repository'
uses: actions/checkout@v4
- name: 'Download all build artifacts'
uses: actions/download-artifact@v4
- name: 'Display structure of downloaded files'
run: ls -R
- name: 'Release with JReleaser'
uses: jreleaser/release-action@v2
with:
arguments: full-release
env:
JRELEASER_PROJECT_VERSION: ${{ github.event.inputs.version }}
JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JRELEASER_HOMEBREW_GITHUB_TOKEN: ${{ secrets.JRELEASER_HOMEBREW_GITHUB_TOKEN }}