Skip to content

chore(release): prepare for 0.5.7 #91

chore(release): prepare for 0.5.7

chore(release): prepare for 0.5.7 #91

Workflow file for this run

# Based on: https://github.com/BurntSushi/ripgrep/blob/master/.github/workflows/ci.yml
name: CI
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
env:
BINNAME: vscode-recent
LIBNAME: librofi_vscode_mode.so
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]
rust: [stable]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
components: clippy
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install common dependencies
run: ci/install-common-deps-ubuntu
- name: Build just the binary
run: cargo build --verbose --bin ${{ env.BINNAME }} --no-default-features
- name: Install rofi dependencies
run: ci/install-rofi-deps-ubuntu
- name: Build everything
run: cargo build --verbose --workspace
- name: Run tests
run: cargo test --verbose --workspace
- name: Lint
run: cargo clippy --all-targets --all-features --tests --all -- -D warnings
- name: Check documentation
env:
RUSTDOCFLAGS: -D warnings
run: cargo doc --no-deps --document-private-items --workspace
rustfmt:
name: rustfmt
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: rustfmt
- name: Check formatting
run: cargo fmt --all --check
release:
name: Release
runs-on: ubuntu-latest
needs: [build, rustfmt]
if: |
github.repository == 'fuljo/rofi-vscode-mode' &&
github.ref_type == 'tag' &&
needs.build.result == 'success' &&
needs.rustfmt.result == 'success'
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
# Fetch the whole history, otherwise we can't generate the changelog
fetch-depth: 0
- name: Generate changelog
uses: orhun/git-cliff-action@v2
id: git-cliff
with:
config: Cargo.toml
# Remove header and footer, print changes for current tag
args: -vv --current --strip header
- name: Create release
uses: softprops/action-gh-release@v1
with:
body_path: ${{ steps.git-cliff.outputs.changelog }}