Moenupa / steam-box

๐ŸŽฎ Update profile README / pinned gist to contain your Steam playtime leaderboard. ๅœจไฝ ็š„ profile README / pinned gist ไธŠๆ˜พ็คบไฝ ็š„ steam ๆธธ็Žฉๆ—ถ้—ดๆŽ’่กŒๆฆœใ€‚

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

steam-box

Update pinned gist / profile README to contain your Steam playtime leaderboard.

Update gist with Steam Playtime


English | ็ฎ€ไฝ“ไธญๆ–‡

๐Ÿ“Œโœจ For more pinned-gist projects like this one, check out: https://github.com/matchai/awesome-pinned-gists

๐Ÿ’ป Setup

๐ŸŽ’ Prep work

if only want's to update a markdown,like profile README,skip step 1 and step 2.

  1. Create a new public GitHub Gist (https://gist.github.com/)

  2. Create a token with the gist scope and copy it. (https://github.com/settings/tokens/new)

  3. Create a Steam API key. (https://steamcommunity.com/dev/apikey)

  4. Find the steam ID (steamID64) of your account. (https://steamid.io)

  5. For updating a markdown file, add comments to the place where you want to update in the markdown file.

     <!-- steam-box start -->
๐ŸŽฎ Dyson Sphere Program             ๐Ÿ•˜ 379 hrs 19 mins
๐Ÿ’ป Wallpaper Engine                 ๐Ÿ•˜ 147 hrs 56 mins
๐ŸŽฎ ๅ˜้‡ - Variables                 ๐Ÿ•˜ 119 hrs 29 mins
๐ŸŽฎ Sid Meier's Civilization VI      ๐Ÿ•˜ 92 hrs 9 mins
๐ŸŽฎ Bloons TD 6                      ๐Ÿ•˜ 68 hrs 36 mins


### ๐Ÿš€ Project setup
1. Fork this repo
1. Edit the [environment variable](https://github.com/YouEclipse/steam-box/actions/runs/126970182/workflow#L17-L19) in `.github/workflows/schedule.yml`:

> For updating github profile README, you can follow [steam-box.yml](https://github.com/YouEclipse/YouEclipse/blob/master/.github/workflows/steam-box.yml) in [YouEclipse](https://github.com/YouEclipse/YouEclipse) to create a Action in your README repo. Remember it's unsafe to use token with **`repo`** scope for updating the repo, steam-box update the profile repo using git command in Github Action instead of using github API.

- **GIST_ID:** The ID portion from your gist url: `https://gist.github.com/YouEclipse/`**`9bc7025496e478f439b9cd43eba989a4`**.

1. Go to the repo **Settings > Secrets**
1. Add the following environment variables:
- **GH_TOKEN:** The GitHub token generated above.
- **STEAM_API_KEY:** The steam API key you created above. 
- **STEAM_ID:** The steam ID of your account. 
1. If you want to show specific games,put the ids in environmet variable **APP_ID**:
- like `APP_ID=431960,730`
- you can get the id of a game from the store url: `https://store.steampowered.com/app/730/CounterStrike_Global_Offensive/`

## ๐Ÿ•ต๏ธ How it works
- Get your games playtime from [Steamwork Web API](https://partner.steamgames.com/doc/webapi) 
- Update Gist with Github API 
- Use Github Actions for updating Gist  

## ๐Ÿ“„ License
This project is licensed under [Apache-2.0](./LICENSE)

About

๐ŸŽฎ Update profile README / pinned gist to contain your Steam playtime leaderboard. ๅœจไฝ ็š„ profile README / pinned gist ไธŠๆ˜พ็คบไฝ ็š„ steam ๆธธ็Žฉๆ—ถ้—ดๆŽ’่กŒๆฆœใ€‚

License:Apache License 2.0


Languages

Language:Go 100.0%