Skip to content

Commit 4edd983

Browse files
committed
chore: Add release workflow
1 parent 6fc9c57 commit 4edd983

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

.github/workflows/release.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
tags:
8+
- "v*"
9+
10+
permissions:
11+
contents: write
12+
13+
jobs:
14+
build:
15+
name: Build Native Image
16+
strategy:
17+
fail-fast: true
18+
matrix:
19+
deploy: [
20+
{ os: macOS-13, name: jindo-x86_64-apple-darwin.zip },
21+
{ os: macOS-14, name: jindo-aarch64-apple-darwin.zip },
22+
{ os: ubuntu-22.04, name: jindo-x86_64-pc-linux.zip },
23+
{ os: ubuntu-24.04-arm, name: jindo-aarch64-pc-linux.zip },
24+
{ os: windows-2022, name: jindo-x86_64-pc-win32.zip }
25+
]
26+
runs-on: ${{ matrix.deploy.os }}
27+
steps:
28+
- uses: actions/checkout@v4
29+
- uses: graalvm/setup-graalvm@v1
30+
with:
31+
java-version: '21'
32+
distribution: 'graalvm'
33+
github-token: ${{ secrets.GITHUB_TOKEN }}
34+
native-image-job-reports: 'true'
35+
- uses: sbt/setup-sbt@v1
36+
- run: sbt graalvm-native-image:packageBin
37+
- name: Zip artifact for deployment
38+
if: ${{ !startsWith(matrix.deploy.os, 'windows') }}
39+
run: zip -r ${{ matrix.deploy.name }} target/graalvm-native-image/jindo
40+
- name: Zip artifact for deployment
41+
if: ${{ startsWith(matrix.deploy.os, 'windows') }}
42+
run: 7z a ${{ matrix.deploy.name }} target/graalvm-native-image/jindo.exe
43+
- name: Release
44+
uses: softprops/action-gh-release@v2
45+
with:
46+
files: ${{ matrix.deploy.name }}
47+
draft: true

0 commit comments

Comments
 (0)