forked from infinispan/infinispan
-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (70 loc) · 2.35 KB
/
release_native.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
name: Release Native Binaries
on:
push:
tags:
- '*'
jobs:
release:
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.release.outputs.upload_url }}
steps:
- name: Checkout Source
uses: actions/checkout@v2
- id: release
name: Create Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{github.ref_name}}
release_name: ${{github.ref_name}}
build:
needs: release
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-2022]
include:
- os: ubuntu-latest
asset_name: linux-amd64
gu_binary: gu
- os: macos-latest
asset_name: darwin-amd64
gu_binary: gu
- os: windows-2022
asset_name: windows-amd64
gu_binary: gu.cmd
steps:
- uses: actions/checkout@v2
- if: ${{ matrix.os == 'windows-2022' }}
name: Add msbuild to PATH
uses: microsoft/[email protected]
- uses: graalvm/setup-graalvm@v1
with:
version: '22.3.0'
java-version: '17'
components: 'native-image'
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout Release Tag
uses: actions/checkout@v2
- if: ${{ matrix.os == 'windows-2022' }}
name: Build native executable
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64
mvnw.cmd package -s maven-settings.xml -Pdistribution -Pwindows -Pnative -am -pl cli
shell: cmd
- if: ${{ matrix.os != 'windows-2022' }}
name: Build native executable
run: ./mvnw package -s maven-settings.xml -Pdistribution -Pnative -am -pl cli
- name: Upload CLI native executable
id: upload-cli-native-executable
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.release.outputs.upload_url }}
asset_path: ./cli/target/infinispan-cli-${{github.ref_name}}.zip
asset_name: infinispan-cli-${{github.ref_name}}-${{ matrix.asset_name }}.zip
asset_content_type: application/zip