Skip to content

Commit

Permalink
ci!: change packaging to expose binaries in releases directly
Browse files Browse the repository at this point in the history
  • Loading branch information
imLinguin committed Jul 27, 2024
1 parent 734b314 commit 99d357b
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 20 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,23 @@ jobs:
name: dummy-GalaxyCommunication.exe
path: dummy-service

- name: Create archives
id: archive-gen
- name: Copy files
shell: bash
run: ci/package-build.sh ${{ matrix.target }}

- name: Create Steam Deck archive
if: ${{ matrix.target == 'x86_64-unknown-linux-gnu' }}
run: |
7z a steam-deck.zip comet* docs/steamdeck/ dummy-service/*.{exe,md,bat} && \
7z rn steam-deck.zip comet-x86_64-unknown-linux-gnu comet
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: comet-${{ matrix.target }}
path: ${{ steps.archive-gen.outputs.archive_name }}
path: |
comet*
steam-deck.zip
draft-release:
permissions:
Expand All @@ -98,5 +105,6 @@ jobs:
draft: true
generate_release_notes: true
files: |
comet*
*.zip
*.tar.gz
15 changes: 3 additions & 12 deletions ci/package-build.sh
Original file line number Diff line number Diff line change
@@ -1,24 +1,15 @@
#!/bin/bash

target=$1
params=''

if [[ -z $target ]]; then
echo "Target not provided"
exit 1
fi

if [ "$RUNNER_OS" = "Linux" ]; then
params='docs/steamdeck'
fi

cp "target/$target/release/comet"* .

if [ "$RUNNER_OS" = "Windows" ]; then
7z a "comet-$target.zip" comet.exe dummy-service/*{.exe,.md,.bat}
echo "archive_name=comet-$target.zip" >> "$GITHUB_OUTPUT"
if [[ -f "target/$target/release/comet" ]]; then
cp "target/$target/release/comet" "./comet-$target"
else
tar -czvf "comet-$target.tar.gz" comet dummy-service/*{.exe,.md,.bat} $params
echo "archive_name=comet-$target.tar.gz" >> "$GITHUB_OUTPUT"
cp "target/$target/release/comet.exe" "./comet-$target.exe"
fi

9 changes: 7 additions & 2 deletions docs/steamdeck/USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ This instruction also applies for desktop users. If you don't use any launcher s
## Installation steps

1. Make sure you are logged into GOG on your launcher of choice.
2. Download the latest release of Comet from [the latest release](https://github.com/imLinguin/comet/releases/latest) or [the latest GitHub Actions run](https://github.com/imLinguin/comet/actions/workflows/build.yml) labelled `comet-x86_64-unknown-linux-gnu` (a 64bit executable for Linux).
2. Download the latest release of Comet from [the latest release](https://github.com/imLinguin/comet/releases/latest) labelled `steam-deck.zip`.
3. Extract the downloaded archive to a desired place.
> It is recommended to have the `comet` binary put into the `~/Documents` directory. Otherwise: choose any directory where your app of choice has access to.
> It is recommended to have the `comet` binary put into the `~/Documents` directory. Otherwise: choose any directory where your app of choice has access to.
> Ensure that the file is Executable in Properties > Permissions
4. Open the `comet_shortcut.sh` file with Kate (right click on the file > Open with Kate), and edit the following values:
- `gog_username`
> Change the `username` value after `=` to your GOG username. If your name includes any special characters make sure to quote the username accordingly
Expand All @@ -27,6 +28,10 @@ This instruction also applies for desktop users. If you don't use any launcher s

## Use with Heroic

> [!NOTE]
> Starting with Heroic 2.15.0, comet will be setup automatically for every GOG game by Heroic itself.
1. Install Comet and its shortcut script. (See the installation steps above.)
2. In Heroic Games Launcher, set the `comet_shortcut.sh` as a script that is going to be ran before the game (Game Settings > Advanced > Scripts)
4. Launch the game through either Desktop or Game Mode!
Expand Down
9 changes: 7 additions & 2 deletions docs/wiki/steamdeck/Usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ This instruction also applies for desktop users. If you don't use any launcher s
## Installation steps

1. Make sure you are logged into GOG on your launcher of choice.
2. Download the latest release of Comet from [the latest release](https://github.com/imLinguin/comet/releases/latest) or [the latest GitHub Actions run](https://github.com/imLinguin/comet/actions/workflows/build.yml) labelled `comet-x86_64-unknown-linux-gnu` (a 64bit executable for Linux).
2. Download the latest release of Comet from [the latest release](https://github.com/imLinguin/comet/releases/latest) labelled `steam-deck.zip`.
3. Extract the downloaded archive to a desired place.
> It is recommended to have the `comet` binary put into the `~/Documents` directory. Otherwise: choose any directory where your app of choice has access to.
> It is recommended to have the `comet` binary put into the `~/Documents` directory. Otherwise: choose any directory where your app of choice has access to.
> Ensure that the file is Executable in Properties > Permissions
4. Open the `comet_shortcut.sh` file with Kate (right click on the file > Open with Kate), and edit the following values:
- `gog_username`
> Change the `username` value after `=` to your GOG username. If your name includes any special characters make sure to quote the username accordingly
Expand All @@ -27,6 +28,10 @@ This instruction also applies for desktop users. If you don't use any launcher s

## Use with Heroic

> [!NOTE]
> Starting with Heroic 2.15.0, comet will be setup automatically for every GOG game by Heroic itself.
1. Install Comet and its shortcut script. (See the installation steps above.)
2. In Heroic Games Launcher, set the `comet_shortcut.sh` as a script that is going to be ran before the game (Game Settings > Advanced > Scripts)
4. Launch the game through either Desktop or Game Mode!
Expand Down

0 comments on commit 99d357b

Please sign in to comment.