Skip to content

Commit dfbdc46

Browse files
fix: rpm binary
1 parent 56798f0 commit dfbdc46

File tree

4 files changed

+93
-33
lines changed

4 files changed

+93
-33
lines changed

.github/workflows/build-binaries.yml

+59
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,59 @@ jobs:
8383
dpkg-deb --build infisical-core
8484
mv infisical-core.deb ./binary/infisical-core-${{matrix.arch}}.deb
8585
86+
### RPM
87+
88+
- name: Set up .rpm package structure
89+
if: matrix.os == 'ubuntu-latest'
90+
run: |
91+
mkdir -p infisical-core-rpm/usr/local/bin
92+
cp ./binary/infisical-core infisical-core-rpm/usr/local/bin/
93+
chmod +x infisical-core-rpm/usr/local/bin/infisical-core
94+
95+
# Install RPM build tools
96+
- name: Install RPM build tools
97+
if: matrix.os == 'ubuntu-latest'
98+
run: sudo apt-get update && sudo apt-get install -y rpm
99+
100+
# Create .spec file for RPM
101+
- name: Create .spec file for RPM
102+
if: matrix.os == 'ubuntu-latest'
103+
run: |
104+
cat <<EOF > infisical-core.spec
105+
Name: infisical-core
106+
Version: ${{ github.event.inputs.version }}
107+
Release: 1%{?dist}
108+
Summary: Infisical Core standalone executable
109+
License: Proprietary
110+
URL: https://app.infisical.com
111+
112+
%description
113+
Infisical Core standalone executable (app.infisical.com)
114+
115+
%install
116+
mkdir -p %{buildroot}/usr/local/bin
117+
cp %{_sourcedir}/infisical-core-rpm/usr/local/bin/infisical-core %{buildroot}/usr/local/bin/
118+
119+
%files
120+
/usr/local/bin/infisical-core
121+
122+
%changelog
123+
* $(date '+%a %b %d %Y') Infisical <daniel@infisical.com> - ${{ github.event.inputs.version }}-1
124+
- Initial RPM release
125+
EOF
126+
127+
# Build .rpm file (Red Hat-based systems only)
128+
- name: Build .rpm package
129+
if: matrix.os == 'ubuntu-latest'
130+
run: |
131+
rpmbuild -bb \
132+
--define "_topdir $(pwd)/rpmbuild" \
133+
--define "_sourcedir $(pwd)" \
134+
--define "_rpmdir $(pwd)/binary" \
135+
--target ${{ matrix.arch == 'x64' && 'x86_64' || 'aarch64' }} \
136+
infisical-core.spec
137+
mv rpmbuild/RPMS/${{ matrix.arch == 'x64' && 'x86_64' || 'aarch64' }}/infisical-core-${{ github.event.inputs.version }}-1.*.${{ matrix.arch == 'x64' && 'x86_64' || 'aarch64' }}.rpm ./binary/infisical-core-${{matrix.arch}}.rpm
138+
86139
- uses: actions/setup-python@v4
87140
with:
88141
python-version: "3.x" # Specify the Python version you need
@@ -97,6 +150,12 @@ jobs:
97150
working-directory: ./backend
98151
run: cloudsmith push deb --republish --no-wait-for-sync --api-key=${{ secrets.CLOUDSMITH_API_KEY }} infisical/infisical-core/any-distro/any-version ./binary/infisical-core-${{ matrix.arch }}.deb
99152

153+
# Publish .rpm file to Cloudsmith (Red Hat-based systems only)
154+
- name: Publish .rpm to Cloudsmith
155+
if: matrix.os == 'ubuntu-latest'
156+
working-directory: ./backend
157+
run: cloudsmith push rpm --republish --no-wait-for-sync --api-key=${{ secrets.CLOUDSMITH_API_KEY }} infisical/infisical-core/any-distro/any-version ./binary/infisical-core-${{ matrix.arch }}.rpm
158+
100159
# Publish .exe file to Cloudsmith (Windows only)
101160
- name: Publish to Cloudsmith (Windows)
102161
if: matrix.os == 'win'

backend/package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/package-lock.json

+27-31
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/package.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212
"storybook": "storybook dev -p 6006 -s ./public",
1313
"build-storybook": "storybook build"
1414
},
15+
"overrides": {
16+
"@storybook/nextjs": {
17+
"sharp": "npm:dry-uninstall"
18+
}
19+
},
1520
"dependencies": {
1621
"@casl/ability": "^6.5.0",
1722
"@casl/react": "^3.1.0",
@@ -48,7 +53,7 @@
4853
"@radix-ui/react-toast": "^1.1.5",
4954
"@radix-ui/react-tooltip": "^1.0.7",
5055
"@reduxjs/toolkit": "^1.8.3",
51-
"@sindresorhus/slugify": "^2.2.1",
56+
"@sindresorhus/slugify": "1.1.0",
5257
"@stripe/react-stripe-js": "^1.16.3",
5358
"@stripe/stripe-js": "^1.46.0",
5459
"@tanstack/react-query": "^4.23.0",

0 commit comments

Comments
 (0)