Skip to content

Commit 6514fda

Browse files
committed
docs(Readme): Sync translations with GitLab support changes
1 parent be366a4 commit 6514fda

File tree

4 files changed

+142
-9
lines changed

4 files changed

+142
-9
lines changed

README-es.md

Lines changed: 46 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ Con DLoad puedes:
6565
- [Equipos Multiplataforma](#equipos-multiplataforma)
6666
- [Gestión de Herramientas PHAR](#gestión-de-herramientas-phar)
6767
- [Distribución de Assets Frontend](#distribución-de-assets-frontend)
68-
- [Límites de Rate de la API de GitHub](#límites-de-rate-de-la-api-de-github)
68+
- [Límites de Rate de la API](#límites-de-rate-de-la-api)
69+
- [Configuración de Gitlab CI](#configuración-de-gitlab-ci)
6970
- [Contribuir](#contribuir)
7071

7172

@@ -458,6 +459,14 @@ El binario de RoadRunner construido incluirá solo los plugins especificados en
458459
<repository type="github" uri="vimeo/psalm" />
459460
<binary name="psalm.phar" pattern="/^psalm\.phar$/" />
460461
</software>
462+
463+
<!-- Repositorio GitLab -->
464+
<software name="My cool project" alias="cool-project"
465+
homepage="https://gitlab.com/path/to/my/repository"
466+
description="">
467+
<repository type="gitlab" uri="path/to/my/repository" asset-pattern="/^cool-.*/" />
468+
<binary name="cool" pattern="/^cool-.*/" />
469+
</software>
461470
</registry>
462471
</dload>
463472
```
@@ -548,16 +557,51 @@ Cada desarrollador obtiene los binarios correctos para su sistema:
548557
</actions>
549558
```
550559

551-
## Límites de Rate de la API de GitHub
560+
## Límites de Rate de la API
552561

553562
Usa un token de acceso personal para evitar límites de rate:
554563

555564
```bash
556565
GITHUB_TOKEN=your_token_here ./vendor/bin/dload get
566+
GITLAB_TOKEN=your_token_here ./vendor/bin/dload get
557567
```
558568

559569
Agrégalo a las variables de entorno CI/CD para descargas automatizadas.
560570

571+
## Configuración de Gitlab CI
572+
573+
Al crear un release en Gitlab, asegúrate de subir tus assets a la página del release a través del
574+
gestor de paquetes. Esto se puede hacer fácilmente mediante Gitlab CLI y el comando `glab release upload --use-package-registry`.
575+
576+
```yaml
577+
# .gitlab-ci.yml
578+
579+
Build artifacts:
580+
stage: push
581+
script:
582+
- mkdir bin
583+
- echo "Mock binary for darwin arm" > bin/cool-darwin-arm64
584+
- echo "Mock binary for darwin amd" > bin/cool-darwin-amd64
585+
- echo "Mock binary for linux arm" > bin/cool-linux-arm64
586+
- echo "Mock binary for linux amd" > bin/cool-linux-amd64
587+
artifacts:
588+
expire_in: 2 hours
589+
paths:
590+
- $CI_PROJECT_DIR/bin/cool-*
591+
rules:
592+
- if: $CI_COMMIT_TAG
593+
594+
Release artifacts:
595+
stage: deploy
596+
image: gitlab/glab:latest
597+
needs: [ "Build artifacts" ]
598+
script:
599+
- glab auth login --job-token $CI_JOB_TOKEN --hostname $CI_SERVER_HOST
600+
- glab release upload --use-package-registry "$CI_COMMIT_TAG" ./bin/*
601+
rules:
602+
- if: $CI_COMMIT_TAG
603+
```
604+
561605
## Contribuir
562606

563607
¡Las contribuciones son bienvenidas! Envía Pull Requests para:

README-ru.md

Lines changed: 47 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ DLoad решает распространённую проблему в PHP-пр
6666
- [Кроссплатформенные команды](#кроссплатформенные-команды)
6767
- [Управление PHAR-инструментами](#управление-phar-инструментами)
6868
- [Распространение фронтенд-ресурсов](#распространение-фронтенд-ресурсов)
69-
- [Ограничения GitHub API](#ограничения-github-api)
69+
- [Ограничения API](#ограничения-api)
70+
- [Конфигурация Gitlab CI](#конфигурация-gitlab-ci)
7071
- [Участие в разработке](#участие-в-разработке)
7172

7273

@@ -459,6 +460,14 @@ DLoad автоматически управляет процессом сбор
459460
<repository type="github" uri="vimeo/psalm" />
460461
<binary name="psalm.phar" pattern="/^psalm\.phar$/" />
461462
</software>
463+
464+
<!-- GitLab репозиторий -->
465+
<software name="My cool project" alias="cool-project"
466+
homepage="https://gitlab.com/path/to/my/repository"
467+
description="">
468+
<repository type="gitlab" uri="path/to/my/repository" asset-pattern="/^cool-.*/" />
469+
<binary name="cool" pattern="/^cool-.*/" />
470+
</software>
462471
</registry>
463472
</dload>
464473
```
@@ -549,16 +558,51 @@ composer require internal/dload -W
549558
</actions>
550559
```
551560

552-
## Ограничения GitHub API
561+
## Ограничения API
553562

554-
Используйте персональный токен доступа чтобы избежать ограничений:
563+
Используйте персональный токен доступа, чтобы избежать ограничений:
555564

556565
```bash
557566
GITHUB_TOKEN=your_token_here ./vendor/bin/dload get
567+
GITLAB_TOKEN=your_token_here ./vendor/bin/dload get
558568
```
559569

560570
Добавьте в переменные окружения CI/CD для автоматических загрузок.
561571

572+
## Конфигурация Gitlab CI
573+
574+
При создании релиза в Gitlab обязательно загрузите артефакты на страницу релиза через
575+
менеджер пакетов. Это легко сделать с помощью Gitlab CLI и команды `glab release upload --use-package-registry`.
576+
577+
```yaml
578+
# .gitlab-ci.yml
579+
580+
Build artifacts:
581+
stage: push
582+
script:
583+
- mkdir bin
584+
- echo "Mock binary for darwin arm" > bin/cool-darwin-arm64
585+
- echo "Mock binary for darwin amd" > bin/cool-darwin-amd64
586+
- echo "Mock binary for linux arm" > bin/cool-linux-arm64
587+
- echo "Mock binary for linux amd" > bin/cool-linux-amd64
588+
artifacts:
589+
expire_in: 2 hours
590+
paths:
591+
- $CI_PROJECT_DIR/bin/cool-*
592+
rules:
593+
- if: $CI_COMMIT_TAG
594+
595+
Release artifacts:
596+
stage: deploy
597+
image: gitlab/glab:latest
598+
needs: [ "Build artifacts" ]
599+
script:
600+
- glab auth login --job-token $CI_JOB_TOKEN --hostname $CI_SERVER_HOST
601+
- glab release upload --use-package-registry "$CI_COMMIT_TAG" ./bin/*
602+
rules:
603+
- if: $CI_COMMIT_TAG
604+
```
605+
562606
## Участие в разработке
563607

564608
Участие приветствуется! Отправляйте Pull Request'ы для:

README-zh.md

Lines changed: 46 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ DLoad 解决了 PHP 项目中的一个实际问题:如何在分发 PHP 代码
6565
- [跨平台团队协作](#跨平台团队协作)
6666
- [PHAR 工具管理](#phar-工具管理)
6767
- [前端资源分发](#前端资源分发)
68-
- [GitHub API 速率限制](#github-api-速率限制)
68+
- [API 速率限制](#api-速率限制)
69+
- [Gitlab CI 配置](#gitlab-ci-配置)
6970
- [参与贡献](#参与贡献)
7071

7172

@@ -458,6 +459,14 @@ DLoad 会自动处理构建过程:
458459
<repository type="github" uri="vimeo/psalm" />
459460
<binary name="psalm.phar" pattern="/^psalm\.phar$/" />
460461
</software>
462+
463+
<!-- GitLab 仓库 -->
464+
<software name="My cool project" alias="cool-project"
465+
homepage="https://gitlab.com/path/to/my/repository"
466+
description="">
467+
<repository type="gitlab" uri="path/to/my/repository" asset-pattern="/^cool-.*/" />
468+
<binary name="cool" pattern="/^cool-.*/" />
469+
</software>
461470
</registry>
462471
</dload>
463472
```
@@ -548,16 +557,51 @@ composer require internal/dload -W
548557
</actions>
549558
```
550559

551-
## GitHub API 速率限制
560+
## API 速率限制
552561

553562
使用个人访问令牌来避免速率限制:
554563

555564
```bash
556565
GITHUB_TOKEN=your_token_here ./vendor/bin/dload get
566+
GITLAB_TOKEN=your_token_here ./vendor/bin/dload get
557567
```
558568

559569
在 CI/CD 环境变量中添加此配置,以便自动下载。
560570

571+
## Gitlab CI 配置
572+
573+
在 Gitlab 中创建发布时,请确保通过包管理器将构建产物上传到发布页面。
574+
这可以通过 Gitlab CLI 和 `glab release upload --use-package-registry` 命令轻松完成。
575+
576+
```yaml
577+
# .gitlab-ci.yml
578+
579+
Build artifacts:
580+
stage: push
581+
script:
582+
- mkdir bin
583+
- echo "Mock binary for darwin arm" > bin/cool-darwin-arm64
584+
- echo "Mock binary for darwin amd" > bin/cool-darwin-amd64
585+
- echo "Mock binary for linux arm" > bin/cool-linux-arm64
586+
- echo "Mock binary for linux amd" > bin/cool-linux-amd64
587+
artifacts:
588+
expire_in: 2 hours
589+
paths:
590+
- $CI_PROJECT_DIR/bin/cool-*
591+
rules:
592+
- if: $CI_COMMIT_TAG
593+
594+
Release artifacts:
595+
stage: deploy
596+
image: gitlab/glab:latest
597+
needs: [ "Build artifacts" ]
598+
script:
599+
- glab auth login --job-token $CI_JOB_TOKEN --hostname $CI_SERVER_HOST
600+
- glab release upload --use-package-registry "$CI_COMMIT_TAG" ./bin/*
601+
rules:
602+
- if: $CI_COMMIT_TAG
603+
```
604+
561605
## 参与贡献
562606

563607
欢迎贡献!你可以提交拉取请求来:

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ With DLoad, you can:
6666
- [Cross-Platform Teams](#cross-platform-teams)
6767
- [PHAR Tools Management](#phar-tools-management)
6868
- [Frontend Asset Distribution](#frontend-asset-distribution)
69-
- [GitHub API Rate Limits](#github-api-rate-limits)
69+
- [API Rate Limits](#api-rate-limits)
70+
- [Gitlab CI configuration](#gitlab-ci-configuration)
7071
- [Contributing](#contributing)
7172

7273

@@ -578,7 +579,7 @@ When you make a release in Gitlab, make sure to upload your assets to the releas
578579
package manager. This can easily be done via Gitlab CLI and the `glab release upload --use-package-registry`
579580
command.
580581
581-
```
582+
```yaml
582583
# .gitlab-ci.yml
583584
584585
Build artifacts:

0 commit comments

Comments
 (0)