Skip to content

Commit fe10abb

Browse files
committed
some changes
1 parent f68276b commit fe10abb

50 files changed

Lines changed: 299 additions & 1440 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Aggregate Game Compatibility Files
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'community-compatibility-list/**/*.json'
9+
- '.github/workflows/aggregate-games.yml'
10+
pull_request:
11+
branches:
12+
- main
13+
paths:
14+
- 'community-compatibility-list/**/*.json'
15+
- '.github/workflows/aggregate-games.yml'
16+
workflow_dispatch: # Allow manual triggering
17+
18+
jobs:
19+
aggregate:
20+
runs-on: ubuntu-latest
21+
22+
permissions:
23+
contents: write
24+
pull-requests: write
25+
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/checkout@v4
29+
with:
30+
token: ${{ secrets.GITHUB_TOKEN }}
31+
fetch-depth: 0
32+
33+
- name: Setup Node.js
34+
uses: actions/setup-node@v4
35+
with:
36+
node-version: '20'
37+
38+
- name: Aggregate game files
39+
run: node scripts/aggregate-games.js
40+
41+
- name: Check for changes
42+
id: check-changes
43+
run: |
44+
if git diff --quiet community-compatibility-list/all-games.json; then
45+
echo "changed=false" >> $GITHUB_OUTPUT
46+
else
47+
echo "changed=true" >> $GITHUB_OUTPUT
48+
fi
49+
50+
- name: Commit changes
51+
if: steps.check-changes.outputs.changed == 'true' && github.event_name == 'push'
52+
run: |
53+
git config --local user.email "action@github.com"
54+
git config --local user.name "GitHub Action"
55+
git add community-compatibility-list/all-games.json
56+
git commit -m "chore: auto-update all-games.json [skip ci]" || exit 0
57+
git push
58+
59+
- name: Create PR comment
60+
if: github.event_name == 'pull_request' && steps.check-changes.outputs.changed == 'true'
61+
uses: actions/github-script@v7
62+
with:
63+
script: |
64+
const fs = require('fs');
65+
const diff = fs.readFileSync('community-compatibility-list/all-games.json', 'utf8');
66+
github.rest.issues.createComment({
67+
issue_number: context.issue.number,
68+
owner: context.repo.owner,
69+
repo: context.repo.repo,
70+
body: `## ⚠️ all-games.json needs to be updated\n\nThis PR modifies game compatibility files. Please run \`node scripts/aggregate-games.js\` locally and commit the updated \`all-games.json` file.\n\n\`\`\`bash\nnode scripts/aggregate-games.js\ngit add community-compatibility-list/all-games.json\ngit commit -m "chore: update all-games.json"\n\`\`\``
71+
});
72+

blog/2019-05-28-first-blog-post.md

Lines changed: 0 additions & 12 deletions
This file was deleted.

blog/2019-05-29-long-blog-post.md

Lines changed: 0 additions & 44 deletions
This file was deleted.

blog/2021-08-01-mdx-blog-post.mdx

Lines changed: 0 additions & 24 deletions
This file was deleted.
-93.9 KB
Binary file not shown.

blog/2021-08-26-welcome/index.md

Lines changed: 0 additions & 29 deletions
This file was deleted.

blog/authors.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.

blog/tags.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.

community-compatibility-list/README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,24 @@ This directory contains JSON files for game compatibility information submitted
44

55
## How to Contribute
66

7-
1. Create a new JSON file named after the game (e.g., `my-game.json`)
7+
1. Create a new JSON file named using the Steam App ID (e.g., `123456.json` where `123456` is the Steam App ID)
88
2. Follow the example structure below
99
3. Submit a pull request
1010

11+
**File Naming**: Use the format `{appId}.json` (e.g., `730.json` for Counter-Strike 2)
12+
13+
**Automation**: The `all-games.json` file is automatically generated by a GitHub Action when you push changes. You don't need to manually update it! The workflow will:
14+
- Run automatically on push to `main`
15+
- Aggregate all individual JSON files into `all-games.json`
16+
- Commit the changes automatically
17+
18+
**Note**: The `all-games.json` file is an aggregated file containing all games in a single array. This allows the website to fetch all compatibility data in a single request without hitting GitHub API rate limits.
19+
20+
**Local Testing**: You can test the aggregation locally by running:
21+
```bash
22+
npm run aggregate-games
23+
```
24+
1125
## JSON Structure
1226

1327
```json
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[
2+
{
3+
"gameName": "Example Game 1",
4+
"appId": 123456,
5+
"bypassRequired": true,
6+
"online": true,
7+
"notes": "This game requires a bypass for online features. Works well with SteamTools."
8+
},
9+
{
10+
"gameName": "Example Game 2",
11+
"appId": 789012,
12+
"bypassRequired": false,
13+
"online": false,
14+
"notes": "Single player game, no bypass needed. Works perfectly offline."
15+
},
16+
{
17+
"gameName": "Test Game",
18+
"appId": 345678,
19+
"bypassRequired": true,
20+
"online": false,
21+
"notes": "Test entry for compatibility list. Requires bypass but doesn't need online features."
22+
}
23+
]

0 commit comments

Comments
 (0)