-
Notifications
You must be signed in to change notification settings - Fork 3
45 lines (43 loc) · 1.22 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
name: Build Release Artifacts
on:
push:
branches: ['release-**']
jobs:
build_matrix:
name: Build for ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
name: [linux, macos]
include:
- name: linux
os: ubuntu-latest
- name: macos
os: macOS-latest
- name: windows
os: windows-latest
steps:
- uses: actions/checkout@v1
- name: Stable with rustfmt and clippy
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- name: Build Release
run: |
cargo build --release
VERSION=v$(./target/release/nvd_cve -V | cut -d' ' -f2)
echo "VERSION: $VERSION"
TARGET=$(rustc -vV | sed -n 's|host: ||p')
echo "TARGET: $TARGET"
gzip -c target/release/nvd_cve >> nvd_cve.$VERSION.$TARGET.gz
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Create Github Release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{secrets.GH_PAT}}
with:
tag_name: ${{env.VERSION}}
generate_release_notes: true
files: |
nvd_cve*gz