Skip to content

Update build.yml

Update build.yml #6

Workflow file for this run

name: Build
on: [push, pull_request]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install pre-requirements
run: sudo curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | bash -s -- -q -y
- name: Install cargo-generate-rpm
run: cargo install cargo-generate-rpm
- name: Install cargo-deb
run: cargo install cargo-deb
- name: Build
run: cargo build --release
- name: Generate RPM
run: cargo generate-rpm
- name: Generate DEB
run: cargo deb
- name: Save RPM / DEB name
run: |
echo "rpm_name=$(ls target/generate-rpm/)" >> "$GITHUB_ENV"
echo "deb_name=$(ls target/debian/)" >> "$GITHUB_ENV"
- name: Upload RPM
uses: actions/upload-artifact@v4
with:
path: target/generate-rpm/
name: ${{ env.rpm_name }}
- name: Upload Deb
uses: actions/upload-artifact@v4
with:
path: target/debian/
name: ${{ env.deb_name }}