-
Notifications
You must be signed in to change notification settings - Fork 8
61 lines (61 loc) · 1.86 KB
/
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
name: Native Image
on:
push:
branches:
- develop
pull_request:
release:
types: [published]
jobs:
native-image:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macOS-latest, ubuntu-latest, windows-2019]
include:
# Replace "example" with the name your binary
- os: macOS-latest
uploaded_filename: sbtn-x86_64-apple-darwin
local_path: client/target/bin/sbtn
- os: ubuntu-latest
uploaded_filename: sbtn-x86_64-pc-linux
local_path: client/target/bin/sbtn
- os: windows-2019
uploaded_filename: sbtn-x86_64-pc-win32.exe
local_path: client\target\bin\sbtn.exe
env:
JAVA_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M
steps:
- name: Checkout sbt/sbt
uses: actions/checkout@v3
with:
repository: sbt/sbt
- name: Setup JDK
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 8
- run: git fetch --tags || true
- name: Setup Windows C++ toolchain
uses: ilammy/msvc-dev-cmd@v1
if: ${{ matrix.os == 'windows-2019' }}
- name: Build
shell: bash
run: |
echo $(pwd)
sbt clean nativeImage
- uses: actions/upload-artifact@v3
with:
path: ${{ matrix.local_path }}
name: ${{ matrix.uploaded_filename }}
- name: Upload release
if: github.event_name == 'release'
uses: actions/upload-release-asset@v1.0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ matrix.local_path }}
asset_name: ${{ matrix.uploaded_filename }}
asset_content_type: application/zip