├── .github ├── PULL_REQUEST_TEMPLATE │ ├── PLUGIN-SUBMISSION.md │ └── PLUGIN-UPDATE.md └── workflows │ ├── ci.yml │ └── pr.yml ├── .gitmodules ├── README.md ├── metadata.json └── scripts ├── _gen_metadata.sh ├── _submodules.sh └── build ├── prepare-dist.sh └── upload-dist.sh /.github/PULL_REQUEST_TEMPLATE/PLUGIN-SUBMISSION.md: -------------------------------------------------------------------------------- 1 | 12 | 13 | # REPLACE_WITH_PLUGIN_NAME 14 | 15 | 20 | 21 | REPLACE_WITH_SUMMARY 22 | 23 | 24 | 25 | ## Task Checklist 26 | 27 | ### Developer 28 | 29 | - [ ] I am the original author or an authorized maintainer of this plugin. 30 | - [ ] I have complied with all license requirements for the libraries used, including providing appropriate notices where necessary. 31 | - [ ] My plugin is fully open source and does not depend on any external paid services, except for widely trusted and well-known platforms. Additionally, neither I nor anyone associated with me profits from any such services. 32 | 33 | ### Plugin Functionality 34 | 35 | - [ ] I have tested the plugin on both the **Stable** and **Beta** SteamOS update channels. 36 | - [ ] My plugin is **unique**, or provides **additional or alternative functionality** to plugins already on the store. 37 | 38 | ### Backend Configuration 39 | 40 | * **Yes/No**: I use a standard Millennium python backend in my plugin. 41 | * **Yes/No**: I use **custom binaries** that or rely on other FOSS projects that aren't written directly using Millennium's python backend. 42 | 43 | ### Community Contribution 44 | 45 | 49 | 50 | - [ ] I have tested and left feedback on **two** other plugin pull requests. 51 | - [ ] I have added links to those feedback comments in this PR. 52 | 53 | --- 54 | 55 | ## Testing Instructions 56 | 57 | 61 | 62 | - [ ] Verified by a third party on **Steam Client Stable**. 63 | - [ ] Verified by a third party on **Steam Client Beta**. 64 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE/PLUGIN-UPDATE.md: -------------------------------------------------------------------------------- 1 | 12 | 13 | # REPLACE_WITH_PLUGIN_NAME 14 | 15 | 19 | 20 | REPLACE_WITH_UPDATE_SUMMARY 21 | 22 | 23 | 24 | ## Task Checklist 25 | 26 | ### Developer 27 | 28 | - [ ] I am the original author or an authorized maintainer of this plugin. 29 | - [ ] I have complied with all license requirements for the libraries used, including providing appropriate notices where necessary. 30 | - [ ] My plugin is fully open source and does not depend on any external paid services, except for widely trusted and well-known platforms. Additionally, neither I nor anyone associated with me profits from any such services. 31 | 32 | ### Plugin Functionality 33 | 34 | - [ ] I have tested the plugin on both the **Stable** and **Beta** SteamOS update channels. 35 | 36 | ### Backend Configuration 37 | 38 | * **Yes/No**: I use a standard Millennium python backend in my plugin. 39 | * **Yes/No**: I use **custom binaries** that or rely on other FOSS projects that aren't written directly using Millennium's python backend. 40 | 41 | ### Community Contribution 42 | 43 | 47 | 48 | - [ ] I have tested and left feedback on **two** other plugin pull requests. 49 | - [ ] I have added links to those feedback comments in this PR. 50 | 51 | --- 52 | 53 | ## Testing Instructions 54 | 55 | 59 | 60 | - [ ] Verified by a third party on **Steam Client Stable**. 61 | - [ ] Verified by a third party on **Steam Client Beta**. 62 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | pull_request: 5 | types: 6 | - closed 7 | push: 8 | branches: 9 | - main 10 | workflow_dispatch: 11 | 12 | concurrency: 13 | group: ci-build 14 | cancel-in-progress: true 15 | 16 | jobs: 17 | prepare: 18 | runs-on: ubuntu-latest 19 | if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true) 20 | 21 | outputs: 22 | submodule-matrix: ${{ steps.discover-submodules.outputs.submodule-matrix }} 23 | steps: 24 | - name: Checkout repository 25 | uses: actions/checkout@v4 26 | with: 27 | submodules: recursive 28 | persist-credentials: true 29 | fetch-depth: 0 30 | 31 | - name: Install Database SDK 32 | id: install-db-sdk 33 | run: | 34 | sudo apt-get update 35 | sudo apt-get install apt-transport-https ca-certificates gnupg curl 36 | curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo gpg --dearmor -o /usr/share/keyrings/cloud.google.gpg 37 | echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list 38 | sudo apt-get update && sudo apt-get install google-cloud-cli 39 | 40 | # Create a directory to cache the SDK installation 41 | mkdir -p ~/.google-cloud-sdk 42 | cp -r /usr/lib/google-cloud-sdk/* ~/.google-cloud-sdk/ 43 | echo "sdk-path=$(realpath ~/.google-cloud-sdk)" >> $GITHUB_OUTPUT 44 | 45 | - name: Cache Database SDK 46 | uses: actions/cache@v3 47 | with: 48 | path: ~/.google-cloud-sdk 49 | key: ${{ runner.os }}-google-cloud-sdk-${{ hashFiles('**/google-cloud-sdk/**') }} 50 | restore-keys: | 51 | ${{ runner.os }}-google-cloud-sdk- 52 | 53 | - name: Upload Build Scripts 54 | uses: actions/upload-artifact@v4 55 | with: 56 | name: build-scripts 57 | path: scripts/build/ 58 | retention-days: 1 59 | 60 | - name: Discover submodules 61 | id: discover-submodules 62 | run: | 63 | sudo bash ./scripts/_gen_metadata.sh 64 | sudo bash ./scripts/_submodules.sh > submodules.json 65 | cat submodules.json 66 | 67 | echo "submodule-matrix=$(cat submodules.json)" >> $GITHUB_OUTPUT 68 | 69 | - name: Commit Metadata 70 | if: github.event_name != 'pull_request' && github.event.repository.fork == false 71 | run: | 72 | git config --global user.name 'github-actions[bot]' 73 | git config --global user.email 'github-actions[bot]@users.noreply.github.com' 74 | 75 | # Stage the changes 76 | git add metadata.json 77 | 78 | # Commit only if there are changes 79 | if git commit -m "chore: Add plugin metadata"; then 80 | # Push only if the commit succeeded 81 | git push 82 | else 83 | echo "::debug::No changes to commit." 84 | fi 85 | 86 | make: 87 | needs: prepare 88 | runs-on: ubuntu-latest 89 | strategy: 90 | fail-fast: false 91 | matrix: ${{ fromJson(needs.prepare.outputs.submodule-matrix) }} 92 | name: Build (${{ matrix.submodules.repository }}) 93 | steps: 94 | - name: Checkout Repository 95 | uses: actions/checkout@v4 96 | with: 97 | repository: ${{ matrix.submodules.repository }} 98 | ref: ${{ matrix.submodules.sha }} 99 | token: ${{ secrets.GITHUB_TOKEN }} 100 | fetch-depth: 0 101 | submodules: recursive 102 | 103 | - name: Set up Node.js 104 | uses: actions/setup-node@v2 105 | with: 106 | node-version: "20" 107 | 108 | - name: Restore Database SDK from Cache 109 | uses: actions/cache@v3 110 | with: 111 | path: ~/.google-cloud-sdk 112 | key: ${{ runner.os }}-google-cloud-sdk-${{ hashFiles('**/google-cloud-sdk/**') }} 113 | restore-keys: | 114 | ${{ runner.os }}-google-cloud-sdk- 115 | 116 | - name: Setup Database SDK Path 117 | run: | 118 | echo "PATH=$PATH:~/.google-cloud-sdk/bin" >> $GITHUB_ENV 119 | gcloud --version 120 | 121 | - name: Authenticate to Database 122 | env: 123 | GCP_SERVICE_ACCOUNT_KEY: ${{ secrets.GCP_SERVICE_ACCOUNT_KEY }} 124 | run: | 125 | echo "${GCP_SERVICE_ACCOUNT_KEY}" > gcloud-key.json 126 | gcloud auth activate-service-account --key-file=gcloud-key.json 127 | gcloud config set project steam-brew 128 | 129 | - name: Download Build Scripts 130 | uses: actions/download-artifact@v4 131 | with: 132 | name: build-scripts 133 | path: scripts/build/ 134 | 135 | - name: Install pnpm 136 | run: npm install -g pnpm 137 | 138 | - name: Install Dependencies 139 | run: | 140 | pnpm install 141 | env: 142 | NODE_ENV: production 143 | 144 | - name: Build Plugin 145 | run: | 146 | pnpm run build 147 | env: 148 | NODE_ENV: production 149 | 150 | - name: Prepare Distribution Files 151 | id: prepare-distribution 152 | run: bash ./scripts/build/prepare-dist.sh --silent 153 | 154 | - name: Upload to database 155 | run: bash ./scripts/build/upload-dist.sh ${{ env.PLUGIN_NAME }} 156 | 157 | - name: Upload Plugin Artifact 158 | uses: actions/upload-artifact@v4 159 | with: 160 | name: ${{ env.PLUGIN_NAME }} 161 | include-hidden-files: true 162 | path: dist/ 163 | -------------------------------------------------------------------------------- /.github/workflows/pr.yml: -------------------------------------------------------------------------------- 1 | name: Test Build 2 | 3 | on: 4 | pull_request: 5 | types: 6 | - opened 7 | - synchronize 8 | - reopened 9 | 10 | workflow_dispatch: 11 | 12 | jobs: 13 | prepare: 14 | runs-on: ubuntu-latest 15 | 16 | outputs: 17 | submodule-matrix: ${{ steps.discover-submodules.outputs.submodule-matrix }} 18 | steps: 19 | - name: Checkout repository 20 | uses: actions/checkout@v4 21 | with: 22 | submodules: recursive 23 | repository: ${{ github.event.pull_request.head.repo.full_name }} 24 | ref: ${{ github.event.pull_request.head.ref }} 25 | persist-credentials: false 26 | fetch-depth: 0 27 | 28 | - name: Upload Build Scripts 29 | uses: actions/upload-artifact@v4 30 | with: 31 | name: build-scripts 32 | path: scripts/build/ 33 | retention-days: 1 34 | 35 | - name: Discover submodules 36 | id: discover-submodules 37 | run: | 38 | sudo bash ./scripts/_gen_metadata.sh 39 | sudo bash ./scripts/_submodules.sh > submodules.json 40 | cat submodules.json 41 | 42 | echo "submodule-matrix=$(cat submodules.json)" >> $GITHUB_OUTPUT 43 | 44 | - name: Commit Metadata 45 | if: github.event_name != 'pull_request' && github.event.repository.fork == false 46 | run: | 47 | git config --global user.name 'github-actions[bot]' 48 | git config --global user.email 'github-actions[bot]@users.noreply.github.com' 49 | 50 | # Stage the changes 51 | git add metadata.json 52 | 53 | # Commit only if there are changes 54 | if git commit -m "chore: Add plugin metadata"; then 55 | # Push only if the commit succeeded 56 | git push 57 | else 58 | echo "::debug::No changes to commit." 59 | fi 60 | 61 | make: 62 | needs: prepare 63 | runs-on: ubuntu-latest 64 | strategy: 65 | fail-fast: false 66 | matrix: ${{ fromJson(needs.prepare.outputs.submodule-matrix) }} 67 | name: Build (${{ matrix.submodules.repository }}) 68 | steps: 69 | - name: Checkout Repository 70 | uses: actions/checkout@v4 71 | with: 72 | repository: ${{ matrix.submodules.repository }} 73 | ref: ${{ matrix.submodules.sha }} 74 | token: ${{ secrets.GITHUB_TOKEN }} 75 | fetch-depth: 0 76 | submodules: recursive 77 | 78 | - name: Download Build Scripts 79 | uses: actions/download-artifact@v4 80 | with: 81 | name: build-scripts 82 | path: scripts/build/ 83 | 84 | - name: Set up Node.js 85 | uses: actions/setup-node@v2 86 | with: 87 | node-version: "20" 88 | 89 | - name: Install pnpm 90 | run: npm install -g pnpm 91 | 92 | - name: Install Dependencies 93 | run: | 94 | pnpm install 95 | env: 96 | NODE_ENV: production 97 | 98 | - name: Build Plugin 99 | run: | 100 | pnpm run build 101 | env: 102 | NODE_ENV: production 103 | 104 | - name: Prepare Distribution Files 105 | run: bash ./scripts/build/prepare-dist.sh 106 | 107 | - name: Upload Plugin 108 | uses: actions/upload-artifact@v4 109 | with: 110 | name: ${{ env.PLUGIN_NAME }} 111 | include-hidden-files: true 112 | path: dist/ 113 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "plugins/steam-browser-history"] 2 | path = plugins/steam-browser-history 3 | url = https://github.com/ricewind012/steam-browser-history 4 | [submodule "plugins/adamraichu.auto-accept-custom-launch-args"] 5 | path = plugins/adamraichu.auto-accept-custom-launch-args 6 | url = https://github.com/AdamRaichu/auto-accept-custom-launch-args 7 | [submodule "plugins/steamdb"] 8 | path = plugins/steamdb 9 | url = https://github.com/BossSloth/Steam-SteamDB-extension 10 | [submodule "plugins/augmented-steam"] 11 | path = plugins/augmented-steam 12 | url = https://github.com/BossSloth/AugmentedSteam-Extension-Plugin 13 | [submodule "plugins/millennium-faceit-stats"] 14 | path = plugins/millennium-faceit-stats 15 | url = https://github.com/alowave/millennium-faceit-stats 16 | [submodule "plugins/aerothemesteam"] 17 | path = plugins/aerothemesteam 18 | url = https://github.com/ricewind012/aerothemesteam 19 | [submodule "plugins/achievement-groups"] 20 | path = plugins/achievement-groups 21 | url = https://github.com/BossSloth/SteamHunter-plugin 22 | [submodule "plugins/dwmx"] 23 | path = plugins/dwmx 24 | url = https://github.com/shdwmtr/dwmx 25 | [submodule "plugins/steam-librarian"] 26 | path = plugins/steam-librarian 27 | url = https://github.com/luthor112/steam-librarian.git 28 | [submodule "plugins/steam-easygrid"] 29 | path = plugins/steam-easygrid 30 | url = https://github.com/luthor112/steam-easygrid.git 31 | [submodule "plugins/steam-taskbar-progress"] 32 | path = plugins/steam-taskbar-progress 33 | url = https://github.com/luthor112/steam-taskbar-progress.git 34 | [submodule "plugins/steam-logo-pos"] 35 | path = plugins/steam-logo-pos 36 | url = https://github.com/luthor112/steam-logo-pos.git 37 | [submodule "plugins/steam-collections-plus"] 38 | path = plugins/steam-collections-plus 39 | url = https://github.com/luthor112/steam-collections-plus.git 40 | [submodule "plugins/non-steam-playtimes"] 41 | path = plugins/non-steam-playtimes 42 | url = https://github.com/apteryxxyz/steam-plugin-non-steam-playtimes 43 | [submodule "plugins/fullscreen-notifications-fix"] 44 | path = plugins/fullscreen-notifications-fix 45 | url = https://github.com/apteryxxyz/steam-plugin-fullscreen-notifications-fix 46 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | ## Plugin Database 3 | 4 | > [!NOTE] 5 | > This repository solely exists for developers to submit plugins.
6 | > Download & install plugins from https://steambrew.app/plugins 7 | 8 |   9 | 10 | ### Submitting A Plugin 11 | 12 | To submit a plugin to Millennium's plugin repository, open a pull request that adds your plugin as a submodule using the command 13 | `git submodule add https://github.com/YourUsername/YourRepository your-plugin` 14 | inside the `plugins` directory. 15 | 16 | This will attach your repository from a specific commit, meaning when you update your repository, the changes won't be reflected here, unless you open a pull request to update it. 17 | This is in place to prevent malicious code by forcing us to audit all of your code changes. 18 | 19 |   20 | 21 | ### Updating Your Plugin 22 | 23 | Once you have your submodule added, in order to update it, 24 | change directory to `plugins/your-plugin`, checkout the branch you wish to use and pull: 25 | ``` 26 | git checkout your-plugin-branch 27 | git pull 28 | ``` 29 | This should update your plugin to the latest version. Commit the change and open a pull request. 30 | 31 |   32 | 33 | In case you wish to clone plugins at their attached commits, run `git submodule update --init`. 34 | -------------------------------------------------------------------------------- /metadata.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": "13f2dcc363c8afc41a42ba5df62aef06db1cc600", 4 | "commitId": "bbc13f4a8b7927eab04526ab5ae58b67438ccc42" 5 | }, 6 | { 7 | "id": "23c7ecc10605f2134e748cf3592bee0b29da1a4b", 8 | "commitId": "084d32b5947103aa36fec083db78b51fd80edd3b" 9 | }, 10 | { 11 | "id": "dc691b7d877b297f38fcf51d9566fc05465b1412", 12 | "commitId": "ebaa4560bb21b1787021a09eba9223997369df4f" 13 | }, 14 | { 15 | "id": "dd5a94af5f22cbd8e6d9091a41392efdb2e9eb0e", 16 | "commitId": "0728119366d138b7a8689a13585a69f2d1776351" 17 | }, 18 | { 19 | "id": "b4c58634419beab7b23cae6eee2d4bef45b454b3", 20 | "commitId": "6f9cbef68c42eac89daedf488c0232b5353314b6" 21 | }, 22 | { 23 | "id": "84b2f76a6f1a5ef88a73145ee8805c1d499121ad", 24 | "commitId": "503e9d8952dcaa35f7fb00be7451b3ae345fb2e4" 25 | }, 26 | { 27 | "id": "57c553750f616459005a996e765c6bc582a1e803", 28 | "commitId": "aad78d38f337f80efbefa764da386257289e542a" 29 | }, 30 | { 31 | "id": "02bed50d10a8b1e58fb8bba608fe6a120a3a0dca", 32 | "commitId": "789fea0210628bf82751ceee435a7fe8e600e7cd" 33 | }, 34 | { 35 | "id": "aca2451aea1d2bc5e5df9a2b8bb3d1b6a8f3fa8b", 36 | "commitId": "74b136aaa98a1548fefce9a0b76202bf99cca689" 37 | }, 38 | { 39 | "id": "a8f305c0bcdbe3b7fd473d2f59c4e8b8b067c648", 40 | "commitId": "77f695289baa8342f88658d49fb230f96a39d4d2" 41 | }, 42 | { 43 | "id": "2519c8a9fc979627a214a78ad642ae5d5723216f", 44 | "commitId": "4b26c16eb42c72f17596a6ab32900b3b61d24605" 45 | }, 46 | { 47 | "id": "266c815057f2fae7249dafe9f80e10d27e89806e", 48 | "commitId": "a39013213d02ce98e2bf564dc15723310794f56d" 49 | }, 50 | { 51 | "id": "113d5b98ee24ae7fefcb7162c6114528547c7dd6", 52 | "commitId": "a36e18f31af22a852fa1558d528ff044dbb42a9a" 53 | }, 54 | { 55 | "id": "749950a94c53e3ef11bc77358a23c916cb44f4f5", 56 | "commitId": "1512cc3ca23cc15913708b37e7fef24e33bb54c9" 57 | }, 58 | { 59 | "id": "c36d5f67c99fc9057073fae4e531caaf17f4b26f", 60 | "commitId": "c26861d351bb19db9b3759194f4fa0c03e814658" 61 | } 62 | ] 63 | -------------------------------------------------------------------------------- /scripts/_gen_metadata.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | parse_plugin() { 4 | local plugins_dir=$1 5 | local submodule=$2 6 | local submodule_path="$plugins_dir/$submodule" 7 | local plugin_name commit_id 8 | 9 | plugin_name=$(git -C "$submodule_path" rev-list --max-parents=0 HEAD 2>/dev/null | tr -d '\n') 10 | commit_id=$(git -C "$submodule_path" rev-parse HEAD 2>/dev/null | tr -d '\n') 11 | 12 | echo "{\"id\": \"$plugin_name\", \"commitId\": \"$commit_id\"}" 13 | } 14 | 15 | plugins_dir="$(pwd)/plugins" 16 | plugin_ids=() 17 | 18 | if [[ -d "$plugins_dir" ]]; then 19 | while IFS= read -r submodule; do 20 | parse_plugin "$plugins_dir" "$submodule" 21 | done < <(ls "$plugins_dir") 22 | fi | jq -s '.' > metadata.json 23 | -------------------------------------------------------------------------------- /scripts/_submodules.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | submodules=() 3 | 4 | while read -r line; do 5 | sha=$(echo "$line" | awk '{print $1}') 6 | name=$(echo "$line" | awk '{print $2}') 7 | 8 | url=$(git config --get submodule."$name".url) 9 | if [[ -n "$url" ]]; then 10 | owner=$(echo "$url" | sed -E 's|https://github.com/([^/]+)/.*|\1|') 11 | repo=$(echo "$url" | sed -E 's|https://github.com/[^/]+/([^/]+).*|\1|' | sed 's/.git$//') 12 | 13 | submodules+=("{\"repository\": \"$owner/$repo\", \"sha\": \"$sha\"}") 14 | fi 15 | done < <(git submodule) 16 | 17 | jq -cn --argjson submodules "[$(IFS=,; echo "${submodules[*]}")]" '{submodules: $submodules}' 18 | -------------------------------------------------------------------------------- /scripts/build/prepare-dist.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Prepare Distribution Files 4 | # This script prepares the distribution files for the plugin 5 | 6 | # Parse command line arguments 7 | SILENT=false 8 | for arg in "$@"; do 9 | case $arg in 10 | --silent) 11 | SILENT=true 12 | shift 13 | ;; 14 | *) 15 | # Unknown option or positional argument 16 | ;; 17 | esac 18 | done 19 | 20 | # Function to log messages with appropriate level 21 | log_message() { 22 | local level="$1" 23 | local message="$2" 24 | 25 | if [ "$SILENT" = true ] && [[ "$level" = "warning" || "$level" = "notice" ]]; then 26 | level="debug" 27 | fi 28 | 29 | echo "::$level::$message" 30 | } 31 | 32 | mkdir -p dist 33 | 34 | cp -r ".millennium" dist/.millennium 2>/dev/null || { log_message "error" ".millennium directory not found, it is required to run the plugin."; exit 1; } 35 | cp "plugin.json" dist/plugin.json 2>/dev/null || { log_message "error" "plugin.json was not found. It is required for plugins to have."; exit 1; } 36 | cp "requirements.txt" dist/requirements.txt 2>/dev/null || log_message "warning" "requirements.txt not found, skipping." 37 | cp "PLUGIN.md" dist/README.md 2>/dev/null || cp "README.md" dist/README.md 2>/dev/null || cp "README" dist/README 2>/dev/null || log_message "warning" "README.md or PLUGIN.md not found, skipping." 38 | 39 | BACKEND_DIR=$(jq -r '.backend' plugin.json) 40 | if [ "$BACKEND_DIR" != "null" ]; then 41 | cp -r "$BACKEND_DIR" ./dist/"$BACKEND_DIR" 42 | else 43 | cp -r "backend" ./dist/backend 2>/dev/null || log_message "warning" "backend directory not found, skipping." 44 | fi 45 | 46 | include=$(jq -r '.include // [] | .[]' plugin.json) 47 | 48 | if [ -z "$include" ]; then 49 | log_message "notice" "No additional files to include." 50 | else 51 | log_message "notice" "Including additional files: $include" 52 | for item in $include; do 53 | mkdir -p "./dist/$(dirname "$item")" 54 | cp -r "./$item" "./dist/$item" 55 | done 56 | fi 57 | 58 | log_message "notice" "Computing plugin metadata..." 59 | echo "{\"commit\": \"$(git rev-parse HEAD)\", \"id\": \"$(git rev-list --max-parents=0 HEAD)\"}" > dist/metadata.json 60 | 61 | PLUGIN_NAME=$(jq -r '.name' plugin.json) || { log_message "error" "name not found in plugin.json"; exit 1; } 62 | echo "PLUGIN_NAME=$PLUGIN_NAME" >> $GITHUB_ENV 63 | 64 | mkdir -p dist/"$PLUGIN_NAME" 65 | mv dist/{*,.*} dist/"$PLUGIN_NAME" 2>/dev/null 66 | 67 | log_message "notice" "Successfully built plugin." 68 | -------------------------------------------------------------------------------- /scripts/build/upload-dist.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "::group::Database" 3 | 4 | PLUGIN_NAME=$1 5 | 6 | cd dist 7 | 8 | echo "Building plugin archive..." 9 | zip -r "$PLUGIN_NAME.zip" . 10 | 11 | echo "Successfully built plugin." 12 | 13 | id=$(jq -r '.id' "$PLUGIN_NAME"/metadata.json) || { echo "::error::Failed to extract id from $PLUGIN_NAME/metadata.json"; exit 1; } 14 | 15 | echo "Uploading plugin to database with id $id" 16 | gsutil cp "$PLUGIN_NAME.zip" gs://millennium-d9ce0.appspot.com/plugins/"$id.zip" 17 | echo "Successfully uploaded plugin to database." 18 | rm "$PLUGIN_NAME.zip" 19 | 20 | echo "::endgroup::" 21 | --------------------------------------------------------------------------------