Skip to content

Commit

Permalink
feat: generate rpm package
Browse files Browse the repository at this point in the history
  • Loading branch information
cecilia-sanare committed Mar 14, 2024
1 parent b9bad06 commit c886c4a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ jobs:
cargo install cargo-deb
cargo deb -o protontweaks.deb
- name: Build RPM (linux)
if: matrix.build == 'linux'
run: |
cargo install cargo-generate-rpm
cargo generate-rpm -o protontweaks.rpm
- name: Rename Binaries (linux / macos)
if: matrix.build != 'windows'
run: mv target/${{ matrix.target }}/release/protontweaks target/${{ matrix.target }}/release/protontweaks-${{ matrix.target }}
Expand All @@ -74,6 +80,7 @@ jobs:
target/${{ matrix.target }}/release/protontweaks.exe
target/${{ matrix.target }}/release/protontweaks-${{ matrix.target }}
protontweaks.deb
protontweaks.rpm
- name: Upload the binaries
uses: softprops/action-gh-release@v1
Expand All @@ -83,3 +90,4 @@ jobs:
target/${{ matrix.target }}/release/protontweaks.exe
target/${{ matrix.target }}/release/protontweaks-${{ matrix.target }}
protontweaks.deb
protontweaks.rpm
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
/result
*.vdf
lcov.info
*.deb
*.rpm
5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,8 @@ tokio = { version = "1.36.0", features = ["rt-multi-thread", "macros"] }

[build-dependencies]
chrono = "0.4.34"

[package.metadata.generate-rpm]
assets = [
{ source = "target/release/protontweaks", dest = "/usr/bin/protontweaks", mode = "755" },
]

0 comments on commit c886c4a

Please sign in to comment.