Skip to content

Commit df1c074

Browse files
authored
Merge pull request #1 from modrinth/main
[pull] main from modrinth:main
2 parents 5429ae8 + c082148 commit df1c074

File tree

1,284 files changed

+145500
-15451
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,284 files changed

+145500
-15451
lines changed

.editorconfig

+3
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,6 @@ max_line_length = 100
1313
[*.md]
1414
max_line_length = off
1515
trim_trailing_whitespace = false
16+
17+
[*.rs]
18+
indent_size = 4

.github/ISSUE_TEMPLATE/1-app-bug.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,4 @@ body:
5656
label: Additional context
5757
description: Add any other context about the problem here.
5858
validations:
59-
required: false
59+
required: false

.github/ISSUE_TEMPLATE/2-web-bug.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: 🌐 Website bug (modrinth.com)
22
description: Report an issue on the Modrinth website.
3-
labels: [bug, frontend]
3+
labels: [bug, web]
44
body:
55
- type: checkboxes
66
attributes:
@@ -49,4 +49,4 @@ body:
4949
label: Additional context
5050
description: Add any other context about the problem here.
5151
validations:
52-
required: false
52+
required: false

.github/ISSUE_TEMPLATE/3-api-bug.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: 🛠️ API issue (api.modrinth.com)
22
description: Report an issue regarding the Modrinth API.
3-
labels: [bug, api]
3+
labels: [bug, backend]
44
body:
55
- type: checkboxes
66
attributes:
@@ -38,4 +38,4 @@ body:
3838
label: Additional context
3939
description: Add any other context about the problem here.
4040
validations:
41-
required: false
41+
required: false

.github/ISSUE_TEMPLATE/4-feature-request.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@ body:
4343
label: Additional context
4444
description: Add any other context or screenshots about the suggested enhancement here.
4545
validations:
46-
required: false
46+
required: false

.github/ISSUE_TEMPLATE/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ contact_links:
1111
url: https://roadmap.modrinth.com
1212
- name: 📚 Documentation
1313
about: Useful documentation about Modrinth's API
14-
url: https://docs.modrinth.com
14+
url: https://docs.modrinth.com

.github/workflows/daedalus-docker.yml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: daedalus-docker-build
2+
3+
on:
4+
push:
5+
branches:
6+
- '**'
7+
paths:
8+
- .github/workflows/daedalus-docker.yml
9+
- 'apps/daedalus_client/**'
10+
pull_request:
11+
types: [opened, synchronize]
12+
paths:
13+
- .github/workflows/daedalus-docker.yml
14+
- 'apps/daedalus_client/**'
15+
merge_group:
16+
types: [checks_requested]
17+
18+
jobs:
19+
docker:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v2
24+
- name: Fetch docker metadata
25+
id: docker_meta
26+
uses: docker/metadata-action@v3
27+
with:
28+
images: ghcr.io/modrinth/daedalus
29+
- name: Login to GitHub Images
30+
uses: docker/login-action@v1
31+
with:
32+
registry: ghcr.io
33+
username: ${{ github.actor }}
34+
password: ${{ secrets.GITHUB_TOKEN }}
35+
- name: Build and push
36+
id: docker_build
37+
uses: docker/build-push-action@v2
38+
with:
39+
file: ./apps/daedalus_client/Dockerfile
40+
push: ${{ github.event_name != 'pull_request' }}
41+
tags: ${{ steps.docker_meta.outputs.tags }}
42+
labels: ${{ steps.docker_meta.outputs.labels }}

.github/workflows/daedalus-run.yml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Run Meta
2+
3+
on:
4+
schedule:
5+
- cron: '*/5 * * * *'
6+
workflow_dispatch:
7+
8+
jobs:
9+
run-docker:
10+
if: github.repository_owner == 'modrinth'
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v3
16+
17+
- name: Log in to GitHub Container Registry
18+
uses: docker/login-action@v2
19+
with:
20+
registry: ghcr.io
21+
username: ${{ github.actor }}
22+
password: ${{ secrets.GITHUB_TOKEN }}
23+
24+
- name: Pull Docker image from GHCR
25+
run: docker pull ghcr.io/modrinth/daedalus:main
26+
27+
- name: Run Docker container
28+
env:
29+
BASE_URL: ${{ secrets.BASE_URL }}
30+
S3_ACCESS_TOKEN: ${{ secrets.S3_ACCESS_TOKEN }}
31+
S3_SECRET: ${{ secrets.S3_SECRET }}
32+
S3_URL: ${{ secrets.S3_URL }}
33+
S3_REGION: ${{ secrets.S3_REGION }}
34+
S3_BUCKET_NAME: ${{ secrets.S3_BUCKET_NAME }}
35+
CLOUDFLARE_INTEGRATION: ${{ secrets.CLOUDFLARE_INTEGRATION }}
36+
CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }}
37+
CLOUDFLARE_ZONE_ID: ${{ secrets.CLOUDFLARE_ZONE_ID }}
38+
run: |
39+
docker run \
40+
--name daedalus \
41+
-e RUST_LOG=warn,daedalus_client=trace \
42+
-e BASE_URL=$BASE_URL \
43+
-e S3_ACCESS_TOKEN=$S3_ACCESS_TOKEN \
44+
-e S3_SECRET=$S3_SECRET \
45+
-e S3_URL=$S3_URL \
46+
-e S3_REGION=$S3_REGION \
47+
-e S3_BUCKET_NAME=$S3_BUCKET_NAME \
48+
-e CLOUDFLARE_INTEGRATION=$CLOUDFLARE_INTEGRATION \
49+
-e CLOUDFLARE_TOKEN=$CLOUDFLARE_TOKEN \
50+
-e CLOUDFLARE_ZONE_ID=$CLOUDFLARE_ZONE_ID \
51+
ghcr.io/modrinth/daedalus:main

.github/workflows/frontend-pages.yml

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
name: Deploy frontend
1+
name: Clear pages cache
22

3-
on: push
3+
on:
4+
push:
5+
branches:
6+
- prod
47

58
jobs:
69
wait:
@@ -16,7 +19,6 @@ jobs:
1619
apiToken: ${{ secrets.CF_API_TOKEN }}
1720
accountId: '9ddae624c98677d68d93df6e524a6061'
1821
project: 'frontend'
19-
githubToken: ${{ secrets.GITHUB_TOKEN }}
2022
commitHash: ${{ steps.push-changes.outputs.commit-hash }}
2123
- name: Purge cache
2224
if: github.ref == 'refs/heads/prod'

.github/workflows/labrinth-docker.yml

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: docker-build
2+
3+
on:
4+
push:
5+
branches:
6+
- '**'
7+
paths:
8+
- .github/workflows/labrinth-docker.yml
9+
- 'apps/labrinth/**'
10+
pull_request:
11+
types: [opened, synchronize]
12+
paths:
13+
- .github/workflows/labrinth-docker.yml
14+
- 'apps/labrinth/**'
15+
merge_group:
16+
types: [checks_requested]
17+
18+
jobs:
19+
docker:
20+
runs-on: ubuntu-latest
21+
defaults:
22+
run:
23+
working-directory: ./apps/labrinth
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v2
27+
- name: Fetch docker metadata
28+
id: docker_meta
29+
uses: docker/metadata-action@v3
30+
with:
31+
images: ghcr.io/modrinth/labrinth
32+
- name: Login to GitHub Images
33+
uses: docker/login-action@v1
34+
with:
35+
registry: ghcr.io
36+
username: ${{ github.actor }}
37+
password: ${{ secrets.GITHUB_TOKEN }}
38+
- name: Build and push
39+
id: docker_build
40+
uses: docker/build-push-action@v2
41+
with:
42+
context: ./apps/labrinth
43+
push: ${{ github.event_name != 'pull_request' }}
44+
tags: ${{ steps.docker_meta.outputs.tags }}
45+
labels: ${{ steps.docker_meta.outputs.labels }}

.github/workflows/app-release.yml .github/workflows/theseus-release.yml

+56-29
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
tags:
77
- 'v*'
88
paths:
9+
- .github/workflows/app-release.yml
910
- 'apps/app/**'
1011
- 'apps/app-frontend/**'
1112
- 'packages/app-lib/**'
@@ -20,12 +21,12 @@ jobs:
2021
strategy:
2122
fail-fast: false
2223
matrix:
23-
platform: [macos-latest, windows-latest, ubuntu-20.04]
24+
platform: [macos-latest, windows-latest, ubuntu-22.04]
2425

2526
runs-on: ${{ matrix.platform }}
2627

2728
steps:
28-
- uses: actions/checkout@v3
29+
- uses: actions/checkout@v4
2930

3031
- name: Rust setup (mac)
3132
if: startsWith(matrix.platform, 'macos')
@@ -43,13 +44,34 @@ jobs:
4344
- name: Setup rust cache
4445
uses: actions/cache@v4
4546
with:
46-
path: target/**
47+
path: |
48+
target/**
49+
!target/*/release/bundle/*/*.dmg
50+
!target/*/release/bundle/*/*.app.tar.gz
51+
!target/*/release/bundle/*/*.app.tar.gz.sig
52+
!target/release/bundle/*/*.dmg
53+
!target/release/bundle/*/*.app.tar.gz
54+
!target/release/bundle/*/*.app.tar.gz.sig
55+
56+
!target/release/bundle/*/*.AppImage
57+
!target/release/bundle/*/*.AppImage.tar.gz
58+
!target/release/bundle/*/*.AppImage.tar.gz.sig
59+
!target/release/bundle/*/*.deb
60+
!target/release/bundle/*/*.rpm
61+
62+
!target/release/bundle/msi/*.msi
63+
!target/release/bundle/msi/*.msi.zip
64+
!target/release/bundle/msi/*.msi.zip.sig
65+
66+
!target/release/bundle/nsis/*.exe
67+
!target/release/bundle/nsis/*.nsis.zip
68+
!target/release/bundle/nsis/*.nsis.zip.sig
4769
key: ${{ runner.os }}-rust-target-${{ hashFiles('**/Cargo.lock') }}
4870
restore-keys: |
4971
${{ runner.os }}-rust-target-
5072
5173
- name: Use Node.js
52-
uses: actions/setup-node@v3
74+
uses: actions/setup-node@v4
5375
with:
5476
node-version: 20
5577

@@ -66,7 +88,7 @@ jobs:
6688
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
6789
6890
- name: Setup pnpm cache
69-
uses: actions/cache@v3
91+
uses: actions/cache@v4
7092
with:
7193
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
7294
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
@@ -77,14 +99,13 @@ jobs:
7799
if: startsWith(matrix.platform, 'ubuntu')
78100
run: |
79101
sudo apt-get update
80-
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf libselinux1
102+
sudo apt-get install -y libwebkit2gtk-4.1-dev build-essential curl wget file libxdo-dev libssl-dev pkg-config libayatana-appindicator3-dev librsvg2-dev
81103
82104
- name: Install frontend dependencies
83105
run: pnpm install
84106

85107
- name: build app (macos)
86-
uses: tauri-apps/tauri-action@v0
87-
id: build_os_mac
108+
run: pnpm --filter=@modrinth/app run tauri build --target universal-apple-darwin --config "tauri-release.conf.json"
88109
if: startsWith(matrix.platform, 'macos')
89110
env:
90111
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -95,34 +116,40 @@ jobs:
95116
APPLE_ID: ${{ secrets.APPLE_ID }}
96117
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
97118
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
98-
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
99-
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
100-
with:
101-
args: "--target universal-apple-darwin --config ./apps/app/tauri-release.conf.json"
102-
working-directory: ./apps/app
119+
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
120+
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
103121

104122
- name: build app
105-
uses: tauri-apps/tauri-action@v0
123+
run: pnpm --filter=@modrinth/app run tauri build --config "tauri-release.conf.json"
106124
id: build_os
107125
if: "!startsWith(matrix.platform, 'macos')"
108126
env:
109127
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
110-
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
111-
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
112-
with:
113-
args: "--config ./apps/app/tauri-release.conf.json"
114-
working-directory: ./apps/app
128+
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
129+
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
115130

116131
- name: upload ${{ matrix.platform }}
117-
uses: actions/upload-artifact@v3
118-
if: startsWith(matrix.platform, 'macos')
119-
with:
120-
name: ${{ matrix.platform }}
121-
path: "${{ join(fromJSON(steps.build_os_mac.outputs.artifactPaths), '\n') }}"
122-
123-
- name: upload ${{ matrix.platform }}
124-
uses: actions/upload-artifact@v3
125-
if: "!startsWith(matrix.platform, 'macos')"
132+
uses: actions/upload-artifact@v4
126133
with:
127134
name: ${{ matrix.platform }}
128-
path: "${{ join(fromJSON(steps.build_os.outputs.artifactPaths), '\n') }}"
135+
path: |
136+
target/*/release/bundle/*/*.dmg
137+
target/*/release/bundle/*/*.app.tar.gz
138+
target/*/release/bundle/*/*.app.tar.gz.sig
139+
target/release/bundle/*/*.dmg
140+
target/release/bundle/*/*.app.tar.gz
141+
target/release/bundle/*/*.app.tar.gz.sig
142+
143+
target/release/bundle/*/*.AppImage
144+
target/release/bundle/*/*.AppImage.tar.gz
145+
target/release/bundle/*/*.AppImage.tar.gz.sig
146+
target/release/bundle/*/*.deb
147+
target/release/bundle/*/*.rpm
148+
149+
target/release/bundle/msi/*.msi
150+
target/release/bundle/msi/*.msi.zip
151+
target/release/bundle/msi/*.msi.zip.sig
152+
153+
target/release/bundle/nsis/*.exe
154+
target/release/bundle/nsis/*.nsis.zip
155+
target/release/bundle/nsis/*.nsis.zip.sig

0 commit comments

Comments
 (0)