Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added config for debian release with cargo deb #40

Merged
merged 2 commits into from
Oct 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ jobs:
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov

- uses: cargo-bins/cargo-binstall@main

- name: Install cargo-deb
run: cargo binstall cargo-deb -y

- name: Use sccache-cache
uses: mozilla-actions/[email protected]

Expand Down Expand Up @@ -63,6 +68,32 @@ jobs:
files: lcov.info
fail_ci_if_error: true

- name: Create Debian package
run: cargo deb
env:
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"

- name: Upload debian package artifact
if: github.ref == 'refs/heads/master'
uses: actions/upload-artifact@v4
with:
name: plastic.deb
path: target/debian/*.deb
overwrite: true

- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
name: Release ${{ github.ref_name }}
body: |
Release ${{ github.ref_name }}
token: ${{ secrets.GITHUB_TOKEN }}
files: |
target/debian/*.deb
LICENSE

windows:
runs-on: windows-latest

Expand Down
9 changes: 9 additions & 0 deletions package/plastic.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[Desktop Entry]
Type=Application
Name=Plastic - NES
Comment=Plastic - NES Emulator
Icon=/usr/share/icons/plastic-icon.png
Exec=/usr/bin/plastic
Terminal=false
Categories=Game;

2 changes: 1 addition & 1 deletion plastic_tui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "plastic_tui"
version = "0.3.3"
authors = ["Amjad Alsharafi <[email protected]>"]
edition = "2021"
description = "An accurate NES emulator. Front-end terminal interface (TUI) for plastic-core"
description = "A NES emulator with terminal interface (TUI)"
readme = "../README.md"
repository = "https://github.com/Amjad50/plastic"
license = "MIT"
Expand Down
21 changes: 20 additions & 1 deletion plastic_ui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "plastic"
version = "0.3.1"
authors = ["Amjad Alsharafi <[email protected]>"]
edition = "2021"
description = "An accurate NES emulator. Front-end for plastic-core"
description = "A NES emulator with GUI and TUI"
readme = "../README.md"
repository = "https://github.com/Amjad50/plastic"
license = "MIT"
Expand All @@ -20,3 +20,22 @@ eframe = "0.29"
rfd = "0.15"
dynwave = "0.1"

[package.metadata.deb]
name = "plastic"
maintainer = "Plastic Maintainers <Amjad Alsharafi <[email protected]>, Hadi Chokr <[email protected]>>"
extended-description = "" # to block usage of README.md
license-file = ["LICENSE", "0"]
depends = ["libasound2-dev", "libudev-dev"]
copyright = "2020, Amjad Alsharafi <[email protected]>"
priority = "optional"
section = "games"
assets = [
["target/release/plastic", "usr/bin/", "755"],
["target/release/plastic_tui", "usr/bin/", "755"],
["../LICENSE", "usr/share/licenses/plastic/", "644"],
["../README.md", "usr/share/doc/plastic/", "644"],
["../docs/man/plastic.1", "usr/share/man/man1/", "644"],
["../package/plastic.desktop", "usr/share/applications/", "644"],
["../images/icon.png", "usr/share/icons/plastic-icon.png", "644"],
]

Loading