Skip to content

Update Rust crate bcrypt to 0.16.0 #179

Update Rust crate bcrypt to 0.16.0

Update Rust crate bcrypt to 0.16.0 #179

Workflow file for this run

name: Build
on: [push, pull_request]
jobs:
build:
name: Build Rockpass
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.78.0
- name: Build
run: cargo build --release --locked
- name: Package current compilation
id: package-current
run: |
install -Dm755 "target/release/rockpass" "rockpass-${GITHUB_REF##*/}-${GITHUB_SHA}-linux-amd64/rockpass"
install -Dm644 "rockpass.toml.example" "rockpass-${GITHUB_REF##*/}-${GITHUB_SHA}-linux-amd64/rockpass.toml.example"
install -Dm644 "README.md" "rockpass-${GITHUB_REF##*/}-${GITHUB_SHA}-linux-amd64/README.md"
install -Dm644 "LICENSE" "rockpass-${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: "rockpass-${{ steps.package-current.outputs.version }}"
path: "rockpass-${{ 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/rockpass" "rockpass-${GITHUB_REF##*/}-linux-amd64/rockpass"
install -Dm644 "rockpass.toml.example" "rockpass-${GITHUB_REF##*/}-linux-amd64/rockpass.toml.example"
install -Dm644 "README.md" "rockpass-${GITHUB_REF##*/}-linux-amd64/README.md"
install -Dm644 "LICENSE" "rockpass-${GITHUB_REF##*/}-linux-amd64/LICENSE"
tar cvJf "rockpass-${GITHUB_REF##*/}-linux-amd64.tar.xz" "rockpass-${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: "rockpass-${{ steps.package.outputs.version }}.tar.xz"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}