fix archi5 #16
This file contains hidden or 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 Packages | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| jobs: | |
| build-rpm: | |
| runs-on: ubuntu-latest | |
| container: fedora:latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install build tools | |
| run: | | |
| dnf install -y rpm-build rpmdevtools | |
| - name: Setup RPM build environment | |
| run: rpmdev-setuptree | |
| - name: Prepare sources | |
| run: | | |
| mkdir -p ~/rpmbuild/SOURCES/count-files-1.0 | |
| cp count_files.sh ~/rpmbuild/SOURCES/count-files-1.0/ | |
| cd ~/rpmbuild/SOURCES | |
| tar czvf count-files-1.0.tar.gz count-files-1.0 | |
| - name: Copy spec file | |
| run: cp packaging/rpm/count-files.spec ~/rpmbuild/SPECS/ | |
| - name: Build RPM | |
| run: rpmbuild -ba ~/rpmbuild/SPECS/count-files.spec | |
| - name: Upload RPM artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: rpm-package | |
| path: ~/rpmbuild/RPMS/noarch/*.rpm | |
| build-deb: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install build tools | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y build-essential debhelper devscripts | |
| - name: Prepare build directory | |
| run: | | |
| mkdir -p build/count-files-1.0 | |
| cp count_files.sh build/count-files-1.0/ | |
| cp -r packaging/deb/debian build/count-files-1.0/ | |
| - name: Build DEB | |
| run: | | |
| cd build/count-files-1.0 | |
| dpkg-buildpackage -us -uc -b | |
| - name: Upload DEB artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: deb-package | |
| path: build/*.deb |