File tree Expand file tree Collapse file tree 2 files changed +46
-2
lines changed
Expand file tree Collapse file tree 2 files changed +46
-2
lines changed Original file line number Diff line number Diff line change 1+ set -euo pipefail
2+ version=$( grep version Cargo.toml | head -1 | awk ' {print $3}' | tr -d ' "' )
3+ # create debian dir
4+ rpm_path=phantomlink-$version
5+
6+ mkdir -p $rpm_path $rpm_path /usr/bin
7+ chmod +x phantomlink
8+ cp phantomlink $rpm_path /usr/bin/
9+ cat > $rpm_path /phantomlink.spec << - EOF
10+ Name: phantomlink
11+ Version: $version
12+ Release: 1
13+ Summary: phantomlink looks like a multi-hop Internet path, but emulates a virtual end-to-end link
14+ License: Apache-2.0 or MIT
15+ Group: Applications/Emulators
16+
17+ %define _rpmdir .
18+ %define _rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm
19+ %define _unpackaged_files_terminate_build 0
20+
21+ %description
22+
23+ %files
24+ "/usr/bin/phantomlink"
25+
26+ EOF
27+ rpmbuild --target=x86_64 --buildroot=$PWD /$rpm_path -bb $rpm_path /phantomlink.spec
Original file line number Diff line number Diff line change 2828 name : phantomlink
2929 path : target/release/phantomlink
3030
31- package :
31+ package-deb :
3232 runs-on : ubuntu-latest
33- name : 🐧 Package
33+ name : 🐧 Package debian
3434 needs : [build]
3535 steps :
3636 - uses : actions/checkout@v4
4848 with :
4949 name : phantomlink_deb
5050 path : " *.deb"
51+
52+ package-rpm :
53+ runs-on : ubuntu-latest
54+ name : 🐧 Package rpm
55+ needs : [build]
56+ steps :
57+ - uses : actions/checkout@v4
58+ - uses : actions/download-artifact@v4
59+ with :
60+ name : phantomlink
61+ - name : Create rpm package
62+ run : bash ./.github/scripts/create_rpm.sh
63+ - name : Upload artifact
64+ uses : actions/upload-artifact@v4
65+ with :
66+ name : phantomlink_rpm
67+ path : " *.rpm"
You can’t perform that action at this time.
0 commit comments