forked from plantuml/plantuml
-
Notifications
You must be signed in to change notification settings - Fork 0
95 lines (84 loc) · 3.24 KB
/
native-image-snapshot.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
name: Native Image - Snapshot
on:
workflow_dispatch:
push:
branches:
- master
paths-ignore:
- '**.md'
- 'docs/**'
jobs:
clean_release:
name: 'Clean the snapshot-native pre-release'
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Clean release and tag
run: |
gh release delete snapshot-native --cleanup-tag -y || true
echo "::notice title=release snapshot-native::snapshot - Native Image at ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/releases/tag/snapshot-native"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build_images:
name: 'Build Native Image ${{ matrix.platform }}'
needs: clean_release
strategy:
matrix:
os: [ macos-latest, windows-latest, ubuntu-latest ]
include:
- os: 'ubuntu-latest'
platform: 'linux-amd64'
- os: 'macos-latest'
platform: 'darwin-arm64'
- os: 'macos-13'
platform: 'darwin-amd64'
- os: 'windows-latest'
platform: 'win-amd64'
runs-on: ${{matrix.os}}
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- uses: graalvm/setup-graalvm@v1
with:
java-version: '21'
github-token: ${{ secrets.GITHUB_TOKEN }}
distribution: liberica
cache: gradle
- name: Set the release version
run: echo "VERSION=$(grep 'version =' gradle.properties | cut -d' ' -f 3)" >> $GITHUB_ENV
shell: bash
- name: Set the DateTime
shell: bash
run: echo "DATETIME=$(date -u +'%F at %T (UTC)')" >> $GITHUB_ENV
- name: Build GPLv2 native image
shell: bash
run: ./gradlew :plantuml-gplv2:nativeFullCompile :plantuml-gplv2:nativeHeadlessCompile -x test
- name: Archive Full Release
uses: thedoctor0/[email protected]
with:
type: 'zip'
filename: "plantuml-full-${{ matrix.platform }}-${{ env.VERSION }}.zip"
directory: plantuml-gplv2/build/native/nativeFullCompile/
- name: Archive Headless Release
uses: thedoctor0/[email protected]
with:
type: 'zip'
filename: "plantuml-headless-${{ matrix.platform }}-${{ env.VERSION }}.zip"
directory: plantuml-gplv2/build/native/nativeHeadlessCompile/
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: "plantuml-gplv2/build/native/native*/plantuml-*-${{ matrix. platform }}-${{ env.VERSION }}.zip"
file_glob: true
tag: snapshot-native
release_name: snapshot - Native Image (~v${{ env.VERSION }})
overwrite: true
make_latest: false
prerelease: true
body: |
## Version ~v${{ env.VERSION }} of the ${{ env.DATETIME }}
This is a [Native Image](https://www.graalvm.org/latest/reference-manual/native-image/) pre-release of [the latest development work](https://github.com/plantuml/plantuml/commits/).
⚠️ **It is not ready for general use** ⚠️
⏱ _Snapshot taken the ${{ env.DATETIME }}_