Skip to content

Commit

Permalink
Update build-binaries.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielHougaard committed Oct 8, 2024
1 parent f6c6558 commit ff815b5
Showing 1 changed file with 25 additions and 3 deletions.
28 changes: 25 additions & 3 deletions .github/workflows/build-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,14 @@ jobs:
### RPM

# Set up .rpm package structure
- name: Set up .rpm package structure
if: matrix.os == 'linux'
run: |
mkdir -p infisical-core-rpm/usr/local/bin
cp ./binary/infisical-core infisical-core-rpm/usr/local/bin/
chmod +x infisical-core-rpm/usr/local/bin/infisical-core
# Install RPM build tools
- name: Install RPM build tools
if: matrix.os == 'linux'
Expand All @@ -108,21 +116,35 @@ jobs:
%files
/usr/local/bin/infisical-core
%pre
%post
%preun
%postun
EOF
# Build .rpm file (Red Hat-based systems only)
# Build .rpm file
- name: Build .rpm package
if: matrix.os == 'linux'
run: |
# Debug: Print current directory contents
echo "Current directory contents:"
ls -R
# Create necessary directories
mkdir -p rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
# Copy the binary to SOURCES
cp -R infisical-core-rpm rpmbuild/SOURCES/
# Run rpmbuild with verbose output
rpmbuild -vv -bb \
--define "_topdir $(pwd)/rpmbuild" \
--define "_sourcedir $(pwd)" \
--define "_rpmdir $(pwd)/binary" \
--define "_sourcedir $(pwd)/rpmbuild/SOURCES" \
--define "_rpmdir $(pwd)/rpmbuild/RPMS" \
--target ${{ matrix.arch == 'x64' && 'x86_64' || 'aarch64' }} \
infisical-core.spec
Expand Down

0 comments on commit ff815b5

Please sign in to comment.