Skip to content

Commit

Permalink
feat: added .deb build target
Browse files Browse the repository at this point in the history
  • Loading branch information
Tormak9970 committed Oct 8, 2024
1 parent 500e219 commit a632d01
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 28 deletions.
77 changes: 50 additions & 27 deletions .github/workflows/create-release-assets/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,47 +94,70 @@ runs:
if (process.env.git_branch == "release") {
const versionNoV = process.env.release_tag.substring(1);
const GENERIC_NAMES = {
"windowsInstaller": "steam-art-manager.msi",
"windowsUpdater": `steam-art-manager_${versionNoV}.msi.zip`,
"windowsUpdaterSig": `steam-art-manager_${versionNoV}.msi.zip.sig`,
"linuxInstaller": "steam-art-manager.AppImage",
"linuxUpdater": `steam-art-manager_${versionNoV}.AppImage.tar.gz`,
"linuxUpdaterSig": `steam-art-manager_${versionNoV}.AppImage.tar.gz.sig`
}
const RENAME_CONFIG = [
// MSI
{
extension: ".msi",
newName: "steam-art-manager.msi"
},
{
extension: ".msi.zip",
newName: `steam-art-manager_${versionNoV}.msi.zip`
},
{
extension: ".msi.zip.sig",
newName: `steam-art-manager_${versionNoV}.msi.zip.sig`
},
// AppInfo
{
extension: ".AppImage",
newName: "steam-art-manager.AppImage"
},
{
extension: ".AppImage.tar.gz",
newName: `steam-art-manager_${versionNoV}.AppImage.tar.gz`
},
{
extension: ".AppImage.tar.gz.sig",
newName: `steam-art-manager_${versionNoV}.AppImage.tar.gz.sig`
},
// DEB
{
extension: ".deb",
newName: "steam-art-manager.deb"
},
{
extension: ".deb.tar.gz",
newName: `steam-art-manager_${versionNoV}.deb.tar.gz`
},
{
extension: ".AppImage.tar.gz.sig",
newName: `steam-art-manager_${versionNoV}.deb.tar.gz.sig`
},
];
const assets = await github.rest.repos.listReleaseAssets({
owner: context.repo.owner,
repo: context.repo.repo,
release_id: process.env.release_id
});
const winInstaller = assets.data.find((asset) => asset.name.endsWith(".msi"));
await setReleaseAssetName(winInstaller.id, GENERIC_NAMES["windowsInstaller"]);
const winUpdater = assets.data.find((asset) => asset.name.endsWith(".msi.zip"));
await setReleaseAssetName(winUpdater.id, GENERIC_NAMES["windowsUpdater"]);
const winUpdaterSig = assets.data.find((asset) => asset.name.endsWith(".msi.zip.sig"));
await setReleaseAssetName(winUpdaterSig.id, GENERIC_NAMES["windowsUpdaterSig"]);
const linuxInstaller = assets.data.find((asset) => asset.name.endsWith(".AppImage"));
await setReleaseAssetName(linuxInstaller.id, GENERIC_NAMES["linuxInstaller"]);
const linuxUpdater = assets.data.find((asset) => asset.name.endsWith(".AppImage.tar.gz"));
await setReleaseAssetName(linuxUpdater.id, GENERIC_NAMES["linuxUpdater"]);
for (const renameConfig of RENAME_CONFIGS) {
const asset = assets.data.find((asset) => asset.name.endsWith(renameConfig.extension));
await setReleaseAssetName(asset.id, renameConfig.newName);
}
const linuxUpdaterSig = assets.data.find((asset) => asset.name.endsWith(".AppImage.tar.gz.sig"));
await setReleaseAssetName(linuxUpdaterSig.id, GENERIC_NAMES["linuxUpdaterSig"]);
const msiUpdater = assets.data.find((asset) => asset.name.endsWith(".msi.zip"));
const appimageUpdater = assets.data.find((asset) => asset.name.endsWith(".AppImage.tar.gz"));
const latest = assets.data.find((asset) => asset.name === "latest.json");
const latestContentsBuff = Buffer.from(await getReleaseAssetContents(latest.id));
let latestContents = latestContentsBuff.toString();
latestContents = latestContents.replace(winUpdater.name, GENERIC_NAMES["windowsUpdater"]);
latestContents = latestContents.replace(linuxUpdater.name, GENERIC_NAMES["linuxUpdater"]);
latestContents = latestContents.replace(msiUpdater.name, GENERIC_NAMES["msiUpdater"]);
latestContents = latestContents.replace(appinfoUpdater.name, GENERIC_NAMES["appimageUpdater"]);
const latestContentsJson = JSON.parse(latestContents);
latestContentsJson.notes = process.env.change_log;
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ To get the most recent release, head to the [latest release](https://github.com/
1. Download the `appimage-installer.sh` bash script.
2. Right click it, go to permissions, and mark it as executable.
3. Double click the script to install SARM.
- **Deb** - Coming Soon
- **Flatpak** - Coming Soon

## How to use the app
When using Steam Art Manager, your workflow will typically be:
Expand Down
3 changes: 2 additions & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@
"shortDescription": "A tool for setting the artwork of your Steam library.",
"targets": [
"appimage",
"msi"
"msi",
"deb"
],
"licenseFile": "wix/short-license.txt",
"createUpdaterArtifacts": "v1Compatible"
Expand Down

0 comments on commit a632d01

Please sign in to comment.