83
83
dpkg-deb --build infisical-core
84
84
mv infisical-core.deb ./binary/infisical-core-${{matrix.arch}}.deb
85
85
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
+
86
139
- uses : actions/setup-python@v4
87
140
with :
88
141
python-version : " 3.x" # Specify the Python version you need
@@ -97,6 +150,12 @@ jobs:
97
150
working-directory : ./backend
98
151
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
99
152
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
+
100
159
# Publish .exe file to Cloudsmith (Windows only)
101
160
- name : Publish to Cloudsmith (Windows)
102
161
if : matrix.os == 'win'
0 commit comments