-
-
Notifications
You must be signed in to change notification settings - Fork 0
95 lines (83 loc) · 2.67 KB
/
publish.yml
File metadata and controls
95 lines (83 loc) · 2.67 KB
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
on:
push:
tags:
- "v*.*.*"
permissions:
contents: write
jobs:
build:
strategy:
matrix:
config:
- name: mobdap.jar
os: ubuntu-24.04
profile: jar
- name: mobdap-linux-amd64
os: ubuntu-24.04
profile: unix
- name: mobdap-linux-arm64
os: ubuntu-24.04-arm
profile: unix
- name: mobdap-macos-amd64
os: macos-13
profile: unix
- name: mobdap-macos-arm64
os: macos-latest
profile: unix
- name: mobdap-windows-amd64
os: windows-latest
profile: windows
runs-on: ${{ matrix.config.os }}
steps:
- uses: actions/checkout@v4
- name: setup graalvm
uses: graalvm/setup-graalvm@v1
shell: bash
with:
distribution: 'graalvm-community'
java-version: '24'
- name: setup clojure
uses: DeLaGuardo/setup-clojure@13.4
shell: bash
with:
lein: 2.11.2
- name: build ${{ matrix.config.name }}
if: matrix.config.profile == 'jar'
run: |
VERSION=${GITHUB_REF_NAME#v}
lein set-version $VERSION
lein uberjar
- name: build ${{ matrix.config.name }}
if: matrix.config.profile != 'jar'
shell: bash
run: |
VERSION=${GITHUB_REF_NAME#v}
lein set-version $VERSION
lein native-image
- name: move jar ${{ matrix.config.name }}
if: matrix.config.profile == 'jar'
run: |
mv target/uberjar/mobdap-*-standalone.jar ${{ matrix.config.name }}
- name: "upload jar: ${{ matrix.config.name }}"
if: matrix.config.profile == 'jar'
uses: softprops/action-gh-release@v2
with:
files: ${{ matrix.config.name }}
- name: "compress unix: ${{ matrix.config.name }}"
if: matrix.config.profile == 'unix'
run: |
tar -czvf ${{ matrix.config.name }}.tar.gz target/native-image/mobdap*
- name: "upload unix: ${{ matrix.config.name }}"
if: matrix.config.profile == 'unix'
uses: softprops/action-gh-release@v2
with:
files: ${{ matrix.config.name }}.tar.gz
- name: "compress windows: ${{ matrix.config.name }}"
if: matrix.config.profile == 'windows'
run: |
Compress-Archive -Path target/native-image/mobdap* -Destination ${{ matrix.config.name }}.zip
- name: "upload windows: ${{ matrix.config.name }}"
if: matrix.config.profile == 'windows'
uses: softprops/action-gh-release@v2
with:
files: ${{ matrix.config.name }}.zip