refactor(test): Use Some
only on parameter of `select_custom_config…
#13
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
name: Release | |
on: | |
push: | |
tags: ["[0-9]+.[0-9]+.[0-9]+*"] | |
workflow_dispatch: | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
CARGO_TERM_COLOR: always | |
jobs: | |
linux: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: Swatinem/rust-cache@v1 | |
- name: Install cargo-deb | |
run: cargo install cargo-deb | |
- name: Install cargo-generate-rpm | |
run: cargo install cargo-generate-rpm | |
- name: Test | |
run: cargo test --release | |
- name: Build .deb | |
run: cargo deb -v -o ./commit_${GITHUB_REF##*/}_amd64.deb | |
- name: Upload .deb package | |
run: | | |
chmod +x ./.github/workflows/upload_asset.sh | |
./.github/workflows/upload_asset.sh \ | |
"alt-art/commit" ./commit_${GITHUB_REF##*/}_amd64.deb $GITHUB_TOKEN | |
- name: Build .rpm | |
run: cargo generate-rpm -o ./commit_${GITHUB_REF##*/}_x86_64.rpm | |
- name: Upload .rpm package | |
run: | | |
chmod +x ./.github/workflows/upload_asset.sh | |
./.github/workflows/upload_asset.sh \ | |
"alt-art/commit" ./commit_${GITHUB_REF##*/}_x86_64.rpm $GITHUB_TOKEN | |
windows: | |
runs-on: windows-latest | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Test | |
run: cargo test --release | |
- name: Build | |
run: cargo build --release | |
- name: Upload portable executable | |
run: | | |
cp ./target/release/commit.exe ./commit-${GITHUB_REF##*/}-portable.exe | |
./.github/workflows/upload_asset.sh \ | |
"alt-art/commit" ./commit-${GITHUB_REF##*/}-portable.exe $GITHUB_TOKEN |