-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #40 from Amjad50/debian_release
Added config for debian release with `cargo deb`
- Loading branch information
Showing
4 changed files
with
61 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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] | ||
|
||
|
@@ -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 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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" | ||
|
@@ -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"], | ||
] | ||
|