Skip to content

Update build.yml

Update build.yml #4

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: Build
run: cargo build --release
- name: Generate RPM
run: cargo generate-rpm
- name: Save RPM name
run: |
echo "rpm_name=$(ls target/generate-rpm/)" >> "$GITHUB_ENV"
- name: Pack
# Create a package with file
run: tar czfv target/generate-rpm/file.tar.gz -C target/generate-rpm/ ${rpm_name}
- name: Upload
uses: actions/upload-artifact@v4
with:
path: target/generate-rpm/file.tar.gz
name: ${rpm_name}.tar.gz