-
Notifications
You must be signed in to change notification settings - Fork 5
69 lines (63 loc) · 1.95 KB
/
cd.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
name: CD
on:
push:
tags:
- '*'
jobs:
release:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
rust: [stable]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Get version
id: get_version
run: echo ::set-output name=version::${GITHUB_REF/refs\/tags\//}
# JDK needed for dynamically linked libraries for JMX
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Build
run: cargo build
- name: Prepare libjvm.dylib for MacOS
if: matrix.os == 'macos-latest'
run: sudo ln -s $(/usr/libexec/java_home)/lib/server/libjvm.dylib /usr/local/lib
- name: Run tests
run: cargo test
- name: Setup MUSL
if: matrix.os == 'ubuntu-latest'
run: |
rustup target add x86_64-unknown-linux-musl
sudo apt-get -qq install musl-tools
- name: Build Release Mac
if: matrix.os == 'macos-latest'
run: make release-mac
- name: Build Release Linux
if: matrix.os == 'ubuntu-latest'
run: make release-linux-musl
- name: Build Release Win
if: matrix.os == 'windows-latest'
run: make release-win
- name: Set SHA
if: matrix.os == 'macos-latest'
id: shasum
run: |
echo ::set-output name=sha::"$(shasum -a 256 ./release/panopticon-tui-mac.tar.gz | awk '{printf $1}')"
- name: Extract release notes
if: matrix.os == 'ubuntu-latest'
id: release_notes
uses: ffurrer2/extract-release-notes@v1
- name: Release
uses: softprops/action-gh-release@v1
with:
body: ${{ steps.release_notes.outputs.release_notes }}
prerelease: true
files: |
./release/*.tar.gz
./release/*.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# TBD Brew