Skip to content

Fix release actions

Fix release actions #1

Workflow file for this run

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