Skip to content

Commit

Permalink
Add workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
shartte committed Aug 10, 2023
1 parent 2452021 commit 9bcdfd4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions .github/workflows/update_curseforge_releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
concurrency:
group: update-releases
cancel-in-progress: false
steps:
- uses: actions/checkout@v3
- run: npm ci
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/update_github_releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
concurrency:
group: update-releases
cancel-in-progress: false
steps:
- uses: actions/checkout@v3
- run: npm ci
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/update_modrinth_releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
concurrency:
group: update-releases
cancel-in-progress: false
steps:
- uses: actions/checkout@v3
- run: npm ci
Expand Down
11 changes: 5 additions & 6 deletions index-modrinth-releases.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { mkdirSync, writeFileSync } from "node:fs";
import {writeFileSync} from "node:fs";

export enum ModrinthReleaseType {
RELEASE = "release",
Expand Down Expand Up @@ -30,10 +30,10 @@ async function fetchReleases(): Promise<ModrinthRelease[]> {
if (!response.ok) {
throw new Error(
"Failed to fetch. " +
response.status +
" (" +
(await response.text()) +
")"
response.status +
" (" +
(await response.text()) +
")"
);
}

Expand All @@ -54,7 +54,6 @@ async function fetchReleases(): Promise<ModrinthRelease[]> {
);
}

mkdirSync("caches");
const releases = await fetchReleases();
writeFileSync(
"caches/modrinth_releases.json",
Expand Down

0 comments on commit 9bcdfd4

Please sign in to comment.