Update Rust crate diesel to v2.2.7 #190
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 Rockpass | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Build | |
run: | | |
docker run --rm -v $(pwd):/app -w /app rust:alpine sh -c " | |
apk -U --no-progress add musl-dev sqlite-dev sqlite-static | |
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 }} |