Update Rust crate clap to v4.5.8 #178
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: Build | |
on: [push, pull_request] | |
jobs: | |
build: | |
name: Build rlpcli | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
- name: Test | |
run: cargo test | |
- name: Build | |
run: cargo build --release --locked | |
- name: Package current compilation | |
id: package-current | |
run: | | |
install -Dm755 "target/release/rlpcli" "rlpcli-${GITHUB_REF##*/}-${GITHUB_SHA}-linux-amd64/rlpcli" | |
install -Dm644 "README.md" "rlpcli-${GITHUB_REF##*/}-${GITHUB_SHA}-linux-amd64/README.md" | |
install -Dm644 "LICENSE" "rlpcli-${GITHUB_REF##*/}-${GITHUB_SHA}-linux-amd64/LICENSE" | |
echo "version=${GITHUB_REF##*/}-${GITHUB_SHA}-linux-amd64" >> $GITHUB_OUTPUT | |
- name: Archive current compilation | |
uses: actions/upload-artifact@v4 | |
with: | |
name: "rlpcli-${{ steps.package-current.outputs.version }}" | |
path: "rlpcli-${{ steps.package-current.outputs.version }}/" | |
- name: Package tagged compilation | |
id: package | |
if: startsWith(github.ref, 'refs/tags/') && github.event_name != 'pull_request' | |
run: | | |
install -Dm755 "target/release/rlpcli" "rlpcli-${GITHUB_REF##*/}-linux-amd64/rlpcli" | |
install -Dm644 "README.md" "rlpcli-${GITHUB_REF##*/}-linux-amd64/README.md" | |
install -Dm644 "LICENSE" "rlpcli-${GITHUB_REF##*/}-linux-amd64/LICENSE" | |
tar cvJf "rlpcli-${GITHUB_REF##*/}-linux-amd64.tar.xz" "rlpcli-${GITHUB_REF##*/}-linux-amd64" | |
echo "version=${GITHUB_REF##*/}-linux-amd64" >> $GITHUB_OUTPUT | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') && github.event_name != 'pull_request' | |
with: | |
files: "rlpcli-${{ steps.package.outputs.version }}.tar.xz" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |