forked from wasmerio/wasmer-java
-
Notifications
You must be signed in to change notification settings - Fork 2
82 lines (68 loc) · 2.17 KB
/
mac_release.yaml
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
on: []
jobs:
publish_jar:
name: Publish the mac JAR
strategy:
matrix:
os: [macos-latest]
# The job runs on different Java versions (LTS).
java: [21]
architecture: [aarch64]
distribution: [temurin]
runs-on: ${{ matrix.os }}
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Set up Java ${{ matrix.version }}
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.java }}
architecture: ${{ matrix.architecture }}
distribution: ${{ matrix.distribution }}
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
override: true
- name: Cache Cargo registry
uses: actions/cache@v1
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache Cargo bin
uses: actions/cache@v1
with:
path: ~/.cargo/bin
key: ${{ runner.os }}-cargo-bin-${{ hashFiles('**/Cargo.lock') }}
- name: Cache Cargo build
uses: actions/cache@v1
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
- name: Run all the tests
shell: bash
run: |
export PATH="$HOME/.cargo/bin:$PATH"
make test
- name: Create the JAR
id: create_jar
shell: bash
run: |
export PATH="$HOME/.cargo/bin:$PATH"
make package
- name: Get release info
id: get_release_info
uses: bruceadams/get-release@v1.3.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload JAR as Github pre-release asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_release_info.outputs.upload_url }}
asset_path: ${{ steps.create_jar.outputs.path }}
asset_name: ${{ steps.create_jar.outputs.name }}
asset_content_type: application/java-archive