This repository has been archived by the owner on Jul 22, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
93 lines (85 loc) · 2.64 KB
/
release.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: release
on:
push:
tags:
- "v*"
jobs:
createrelease:
name: create release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: true
prerelease: true
- run: echo "${{ steps.create_release.outputs.upload_url }}" > release_url.txt
- uses: actions/upload-artifact@v1
with:
name: release_url
path: release_url.txt
macos:
needs: [createrelease]
name: build and upload
runs-on: ${{ matrix.config.os }}
strategy:
matrix:
config:
- {
os: ubuntu-latest,
suffix: "x86-amd64.deb",
asset_path: "./target/release/radical-native.deb",
}
- {
os: ubuntu-latest,
suffix: "x86-amd64",
asset_path: "./target/release/radical-native",
}
- {
os: macos-latest,
suffix: "darwin.pkg",
asset_path: "./target/release/radical-native.pkg",
}
- {
os: windows-latest,
suffix: "win64.exe",
asset_path: "./target/release/radical-native-installer.exe",
}
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v1
with:
name: release_url
- name: prereq
if: matrix.config.os == 'ubuntu-latest'
run: |
sudo apt-get install libsqlcipher0 libsqlcipher-dev libsecret-1-dev
cargo install cargo-deb
- name: build
id: build
shell: bash
run: |
# enable symlinking for windows
# (workaround for patched cxx crate)
export MSYS=winsymlinks:nativestrict
git config --global core.symlinks true
npm install
npm run lint
npm run build:native
value=`cat release_url/release_url.txt`
echo "::set-output name=upload_url::$value"
echo "::set-output name=version::${GITHUB_REF:10}"
- id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.build.outputs.upload_url }}
asset_path: ${{ matrix.config.asset_path }}
asset_name: radical-native_${{ steps.build.outputs.version }}_${{ matrix.config.suffix }}
asset_content_type: application/octet-stream