chore(release): v0.2.0 #20
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
tags: | |
- '*.*.*' | |
name: Create release | |
jobs: | |
build: | |
name: Create Release | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Get the version | |
id: version | |
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3) | |
- name: Install cargo plugins | |
run: cargo install cargo-rpm cargo-deb | |
continue-on-error: true | |
- name: Build binary | |
run: cargo build --release | |
- name: Build deb package | |
run: cargo deb | |
- name: Build rpm package | |
run: cargo rpm build | |
- name: Create release | |
uses: softprops/action-gh-release@v1 | |
with: | |
name: Release ${{ github.ref }} | |
prerelease: false | |
draft: false | |
files: | | |
target/release/netbox2netshot | |
target/debian/*.deb | |
target/release/rpmbuild/RPMS/x86_64/*.rpm |