1
0
mirror of synced 2026-01-09 15:02:41 -05:00

Merge branch 'main' into repo-sync

This commit is contained in:
Octomerger Bot
2021-12-04 19:07:23 -06:00
committed by GitHub
10 changed files with 266 additions and 200 deletions

View File

@@ -1,7 +1,7 @@
---
title: Crear plantillas de flujo de trabajo
shortTitle: Crear plantillas
intro: Aprende cómo puedes crear plantillas de flujo de trabajo para ayudar a los integrantes de tu equipo a agregar flujos de trabajo nuevos más fácilmente.
title: Creating workflow templates
shortTitle: Creating templates
intro: Learn how you can create workflow templates to help people in your team add new workflows more easily.
redirect_from:
- /actions/configuring-and-managing-workflows/sharing-workflow-templates-within-your-organization
versions:
@@ -19,13 +19,13 @@ topics:
{% data reusables.actions.enterprise-github-hosted-runners %}
{% data reusables.actions.ae-beta %}
## Resumen
## Overview
{% data reusables.actions.workflow-organization-templates %}
## Crear una plantilla de flujo de trabajo
## Creating a workflow template
Los usuarios con acceso de escritura en el repositorio `.github` de la organización pueden crear plantillas de flujo de trabajo. Los miembros de la organización que tengan permisos para crear flujos de trabajo podrán entonces utilizar estas plantillas.
Workflow templates can be created by users with write access to the organization's `.github` repository. The templates can then be used by organization members who have permission to create workflows.
{% ifversion fpt %}
Your workflow templates can be used to create workflows in public repositories only. Organizations using {% data variables.product.prodname_ghe_cloud %} can also use workflow templates to create workflows in private repositories. For more information, see the [{% data variables.product.prodname_ghe_cloud %} documentation](/enterprise-cloud@latest/actions/learn-github-actions/creating-workflow-templates).
@@ -34,20 +34,20 @@ Your workflow templates can be used to create workflows in public repositories o
{% ifversion fpt or ghes > 3.3 or ghae-issue-4757 or ghec %}
{% note %}
**Nota:** Para evitar la duplicación en los flujos de trabajo que se crean a partir de una plantilla, puedes llamar a los flujos reutilizables desde una plantilla de flujo de trabajo. Esto puede ayudar a que tus flujos de trabajo se mantengan más fácilmente. Para obtener más información, consulta la sección "[Reutilizar flujos de trabajo](/actions/learn-github-actions/reusing-workflows)".
**Note:** To avoid duplication in workflows created from a template you can call reusable workflows from within a workflow template. This can help make your workflows easier to maintain. For more information, see "[Reusing workflows](/actions/learn-github-actions/reusing-workflows)."
{% endnote %}
{% endif %}
Este procedimiento muestra cómo crear una plantilla de flujo de trabajo y un archivo de metadatos. El archivo de metadatos describe cómo se presenta la plantilla a los usuarios cuando están creando un flujo de trabajo nuevo.
This procedure demonstrates how to create a workflow template and metadata file. The metadata file describes how the template is presented to users when they are creating a new workflow.
1. En caso de que no exista previamente, crea en tu organización un repositorio público nuevo que se llame `.github`.
2. Crea un directorio que se llame `workflow-templates`.
3. Crea tu nuevo archivo de flujo de trabajo dentro del directorio `workflow-templates`.
1. If it doesn't already exist, create a new public repository named `.github` in your organization.
2. Create a directory named `workflow-templates`.
3. Create your new workflow file inside the `workflow-templates` directory.
Si necesitas referirte a la rama predeterminada de un repositorio, puedes utilizar el marcador de posición `$default-branch`. Cuando se crea un flujo de trabajo utilizando tu plantilla, el marcador de posición se reemplazará automáticamente con el nombre de la rama predeterminada del repositorio.
If you need to refer to a repository's default branch, you can use the `$default-branch` placeholder. When a workflow is created using your template, the placeholder will be automatically replaced with the name of the repository's default branch.
Por ejemplo, este archivo de nombre `octo-organization-ci.yml` ilustra un flujo de trabajo básico.
For example, this file named `octo-organization-ci.yml` demonstrates a basic workflow.
```yaml
name: Octo Organization CI
@@ -68,7 +68,7 @@ Este procedimiento muestra cómo crear una plantilla de flujo de trabajo y un ar
- name: Run a one-line script
run: echo Hello from Octo Organization
```
4. Crea un archivo de metadatos dentro del directorio `workflow-templates`. El archivo de metadatos debe tener el mismo nombre que el archivo de flujo de trabajo, pero en vez de tener la extensión `.yml`, este deberá encontrarse adjunto en `.properties.json`. Por ejemplo, este archivo que se llama `octo-organization-ci.properties.json` contiene los metadatos para un archivo de flujo de trabajo de nombre `octo-organization-ci.yml`:
4. Create a metadata file inside the `workflow-templates` directory. The metadata file must have the same name as the workflow file, but instead of the `.yml` extension, it must be appended with `.properties.json`. For example, this file named `octo-organization-ci.properties.json` contains the metadata for a workflow file named `octo-organization-ci.yml`:
```yaml
{
"name": "Octo Organization Workflow",
@@ -84,16 +84,16 @@ Este procedimiento muestra cómo crear una plantilla de flujo de trabajo y un ar
]
}
```
* `name` - **Requerido.** El nombre de la plantilla de flujo de trabajo. Este se muestra en la lista de plantillas disponibles.
* `description` - **Requerido.** La descripción de la plantilla de flujo de trabajo. Este se muestra en la lista de plantillas disponibles.
* `iconName` - **Requerido.** Define un icono en la lista de plantillas para la entrada del flujo de trabajo. El `iconName` debe ser un icono en SVG del mismo nombre y se debe almacenar en el directorio `workflow-templates`. Por ejemplo, un archivo de tipo SVG que se nombre `example-icon.svg` se referenciará como `example-icon`.
* `categories` - **Opcional.** Define la categoría de lenguaje del flujo de trabajo. Cuando un usuario visualiza las plantillas disponibles, aquellas que empaten con el mismo lenguaje se presentarán con mayor prominencia. Para obtener información sobre las categorías de lenguaje disponibles, consulta https://github.com/github/linguist/blob/master/lib/linguist/languages.yml.
* `filePatterns` - **Opcional.** Permite que se utilice la plantilla si el repositorio del usuario contiene un archivo en su directorio raíz, el cual empate con una expresión regular definida.
* `name` - **Required.** The name of the workflow template. This is displayed in the list of available templates.
* `description` - **Required.** The description of the workflow template. This is displayed in the list of available templates.
* `iconName` - **Optional.** Defines an icon for the workflow's entry in the template list. The `iconName` must be an SVG icon of the same name, and must be stored in the `workflow-templates` directory. For example, a SVG file named `example-icon.svg` is referenced as `example-icon`.
* `categories` - **Optional.** Defines the language category of the workflow. When a user views the available templates, those templates that match the same language will feature more prominently. For information on the available language categories, see https://github.com/github/linguist/blob/master/lib/linguist/languages.yml.
* `filePatterns` - **Optional.** Allows the template to be used if the user's repository has a file in its root directory that matches a defined regular expression.
Para agregar otra plantilla de flujo de trabajo, agrega tus archivos al mismo directorio de `workflow-templates`. Por ejemplo:
To add another workflow template, add your files to the same `workflow-templates` directory. For example:
![Archivos de plantilla de flujo de trabajo](/assets/images/help/images/workflow-template-files.png)
![Workflow template files](/assets/images/help/images/workflow-template-files.png)
## Pasos siguientes
## Next steps
Para seguir aprendiendo sobre las {% data variables.product.prodname_actions %}, consulta la sección "[Utilizar plantillas de flujo de trabajo](/actions/learn-github-actions/using-workflow-templates)".
To continue learning about {% data variables.product.prodname_actions %}, see "[Using workflow templates](/actions/learn-github-actions/using-workflow-templates)."

View File

@@ -1,6 +1,6 @@
---
title: Publicar paquetes Node.js
intro: Puedes publicar paquetes Node.js en un registro como parte de tu flujo de trabajo de integración continua (CI).
title: Publishing Node.js packages
intro: You can publish Node.js packages to a registry as part of your continuous integration (CI) workflow.
redirect_from:
- /actions/automating-your-workflow-with-github-actions/publishing-nodejs-packages
- /actions/language-and-framework-guides/publishing-nodejs-packages
@@ -16,51 +16,51 @@ topics:
- Publishing
- Node
- JavaScript
shortTitle: Paquetes de Node.js
shortTitle: Node.js packages
---
{% data reusables.actions.enterprise-beta %}
{% data reusables.actions.enterprise-github-hosted-runners %}
{% data reusables.actions.ae-beta %}
## Introducción
## Introduction
Esta guía te muestra cómo crear un flujo de trabajo que publique paquetes Node.js en el {% data variables.product.prodname_registry %} y registros npm después de que se aprueben las pruebas de integración continua (CI). Con un solo flujo de trabajo, puedes publicar paquetes en un solo registro o varios registros.
This guide shows you how to create a workflow that publishes Node.js packages to the {% data variables.product.prodname_registry %} and npm registries after continuous integration (CI) tests pass. With a single workflow, you can publish packages to a single registry or multiple registries.
## Prerrequisitos
## Prerequisites
Te recomendamos que tengas una comprensión básica de las opciones de configuración de flujo de trabajo y cómo crear un archivo de flujo de trabajo. Para obtener más información, consulta la sección "[Aprende sobre {% data variables.product.prodname_actions %}](/actions/learn-github-actions)".
We recommend that you have a basic understanding of workflow configuration options and how to create a workflow file. For more information, see "[Learn {% data variables.product.prodname_actions %}](/actions/learn-github-actions)."
Para obtener más información acerca de la creación de un flujo de trabajo de CI para tu proyecto Node.js, consulta "[Usar Node.js con las {% data variables.product.prodname_actions %}](/actions/automating-your-workflow-with-github-actions/using-nodejs-with-github-actions)".
For more information about creating a CI workflow for your Node.js project, see "[Using Node.js with {% data variables.product.prodname_actions %}](/actions/automating-your-workflow-with-github-actions/using-nodejs-with-github-actions)."
También puede ser útil tener un entendimiento básico de lo siguiente:
You may also find it helpful to have a basic understanding of the following:
- "[Trabajar con el registro de npm](/packages/working-with-a-github-packages-registry/working-with-the-npm-registry)"
- "[Variables de ambiente](/actions/reference/environment-variables)"
- "[Secretos cifrados](/actions/reference/encrypted-secrets)"
- "[Autenticación en un flujo de trabajo](/actions/reference/authentication-in-a-workflow)"
- "[Working with the npm registry](/packages/working-with-a-github-packages-registry/working-with-the-npm-registry)"
- "[Environment variables](/actions/reference/environment-variables)"
- "[Encrypted secrets](/actions/reference/encrypted-secrets)"
- "[Authentication in a workflow](/actions/reference/authentication-in-a-workflow)"
## Acerca de la configuración del paquete
## About package configuration
Los campos `Nombre` y `Versión` en el archivo *package.json* crean un identificador único que los registros usan para vincular tu paquete a un registro. Puedes agregar un resumen para la página de descripción del paquete al incluir un campo `Descripción` en el archivo *package.json*. Para obtener más información, consulta "[Crear un archivo package.json](https://docs.npmjs.com/creating-a-package-json-file) y [Crear módulos Node.js](https://docs.npmjs.com/creating-node-js-modules)"en la documentación de npm.
The `name` and `version` fields in the *package.json* file create a unique identifier that registries use to link your package to a registry. You can add a summary for the package listing page by including a `description` field in the *package.json* file. For more information, see "[Creating a package.json file](https://docs.npmjs.com/creating-a-package-json-file)" and "[Creating Node.js modules](https://docs.npmjs.com/creating-node-js-modules)" in the npm documentation.
Cuando existe un archivo *.npmrc* local y tiene un valor especificado de `registro`, el comando `npm publish` usa el registro configurado en el archivo *.npmrc*. {% data reusables.github-actions.setup-node-intro %}
When a local *.npmrc* file exists and has a `registry` value specified, the `npm publish` command uses the registry configured in the *.npmrc* file. {% data reusables.github-actions.setup-node-intro %}
Puedes especificar la versión de Node.js instalada en el ejecutor utilizando la acción `setup-node`.
You can specify the Node.js version installed on the runner using the `setup-node` action.
Si agregas pasos en tu flujo de trabajo para configurar los campos `publishConfig` en tu archivo *package.json*, no es necesario que especifiques la Url del registro utilizando la acción `setup-node`, pero se limitará a publicar el paquete en un registro. Para obtener más información, consulta "[publishConfig](https://docs.npmjs.com/files/package.json#publishconfig)" en la documentación de npm.
If you add steps in your workflow to configure the `publishConfig` fields in your *package.json* file, you don't need to specify the registry-url using the `setup-node` action, but you will be limited to publishing the package to one registry. For more information, see "[publishConfig](https://docs.npmjs.com/files/package.json#publishconfig)" in the npm documentation.
## Publicar paquetes en el registro npm
## Publishing packages to the npm registry
Cada vez que creas un lanzamiento nuevo, puedes desencadenar un flujo de trabajo para publicar tu paquete. El flujo de trabajo en el ejemplo a continuación se ejecuta cuando el evento `lanzamiento` desencadena con tipo `creado`. El flujo de trabajo publica el paquete en el registro npm si se pasan las pruebas de CI.
Each time you create a new release, you can trigger a workflow to publish your package. The workflow in the example below runs when the `release` event triggers with type `created`. The workflow publishes the package to the npm registry if CI tests pass.
Para realizar operaciones autenticadas frente al registro npm en tu flujo de trabajo, necesitarás almacenar tu token de autenticación npm como un secreto. Por ejemplo, crea un repositorio secreto que se llame `NPM_TOKEN`. Para más información, consulta "[Crear y usar secretos cifrados](/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets)."
To perform authenticated operations against the npm registry in your workflow, you'll need to store your npm authentication token as a secret. For example, create a repository secret called `NPM_TOKEN`. For more information, see "[Creating and using encrypted secrets](/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets)."
Por defecto, npm usa el campo `Nombre` del archivo *package.json* para determinar el registro npm. Al publicar en un espacio de nombres global, solo necesitas incluir el nombre del paquete. Por ejemplo, publicarías un paquete llamado `npm-hello-world-test` en `https://www.npmjs.com/package/npm-hello-world-test`.
By default, npm uses the `name` field of the *package.json* file to determine the npm registry. When publishing to a global namespace, you only need to include the package name. For example, you would publish a package named `npm-hello-world-test` to the `https://www.npmjs.com/package/npm-hello-world-test`.
Si estás publicando un paquete que incluye un prefijo de alcance, incluye el ámbito en el nombre de tu archivo *package.json*. Por ejemplo, si el prefijo del ámbito npm es octocat y el nombre del paquete es hello-world, el `nombre` en tu archivo *package.json* debe ser `@octocat/hello-world`. Si su paquete npm usa un prefijo de ámbito y el paquete es público, debes usar la opción `npm publish --access public`. Esta es una opción que npm requiere para evitar que alguien publique un paquete privado involuntariamente.
If you're publishing a package that includes a scope prefix, include the scope in the name of your *package.json* file. For example, if your npm scope prefix is octocat and the package name is hello-world, the `name` in your *package.json* file should be `@octocat/hello-world`. If your npm package uses a scope prefix and the package is public, you need to use the option `npm publish --access public`. This is an option that npm requires to prevent someone from publishing a private package unintentionally.
Este ejemplo almacena el secreto `NPM_TOKEN` en la variable de entorno `NODE_AUTH_TOKEN`. Cuando la acción `setup-node` crea un archivo *.npmrc*, hace referencia al token de la variable de entorno `NODE_AUTH_TOKEN`.
This example stores the `NPM_TOKEN` secret in the `NODE_AUTH_TOKEN` environment variable. When the `setup-node` action creates an *.npmrc* file, it references the token from the `NODE_AUTH_TOKEN` environment variable.
{% raw %}
```yaml{:copy}
@@ -78,14 +78,14 @@ jobs:
with:
node-version: '12.x'
registry-url: 'https://registry.npmjs.org'
- run: npm install
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
```
{% endraw %}
En el ejemplo anterior, la acción `setup-node` crea un archivo *.npmrc* en el ejecutor con el siguiente contenido:
In the example above, the `setup-node` action creates an *.npmrc* file on the runner with the following contents:
```ini
//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}
@@ -93,15 +93,15 @@ registry=https://registry.npmjs.org/
always-auth=true
```
## Sube paquetes al {% data variables.product.prodname_registry %}
## Publishing packages to {% data variables.product.prodname_registry %}
Cada vez que creas un lanzamiento nuevo, puedes desencadenar un flujo de trabajo para publicar tu paquete. El flujo de trabajo en el ejemplo a continuación se ejecuta cada vez que se produce el evento `lanzamiento` con tipo `creado`. El flujo de trabajo publica el paquete en el {% data variables.product.prodname_registry %} si se superan las pruebas de CI.
Each time you create a new release, you can trigger a workflow to publish your package. The workflow in the example below runs anytime the `release` event with type `created` occurs. The workflow publishes the package to {% data variables.product.prodname_registry %} if CI tests pass.
### Configurar el repositorio de destino
### Configuring the destination repository
Si no proporcionas la clave del `repository` en tu archivo *package.json*, entonces el {% data variables.product.prodname_registry %} publicará un paquete en el repositorio de {% data variables.product.prodname_dotcom %} que especifiques en el campo `name` del archivo *package.json*. Por ejemplo, un paquete denominado `@my-org/test` se publicará en el repositorio `my-org/test` de {% data variables.product.prodname_dotcom %}.
If you don't provide the `repository` key in your *package.json* file, then {% data variables.product.prodname_registry %} publishes a package in the {% data variables.product.prodname_dotcom %} repository you specify in the `name` field of the *package.json* file. For example, a package named `@my-org/test` is published to the `my-org/test` {% data variables.product.prodname_dotcom %} repository.
Sin embargo, si no proporcionas la clave del `repository`, entonces el repositorio en esa clave se utilizará como el registro de npm de destino para el {% data variables.product.prodname_registry %}. Por ejemplo, el publicar el siguiente *package.json* dará como resultado un paquete denominado `my-amazing-package` que se publicará en el repositorio `octocat/my-other-repo` de {% data variables.product.prodname_dotcom %}.
However, if you do provide the `repository` key, then the repository in that key is used as the destination npm registry for {% data variables.product.prodname_registry %}. For example, publishing the below *package.json* results in a package named `my-amazing-package` published to the `octocat/my-other-repo` {% data variables.product.prodname_dotcom %} repository.
```json
{
@@ -112,15 +112,15 @@ Sin embargo, si no proporcionas la clave del `repository`, entonces el repositor
},
```
### Autenticarse en el repositorio de destino
### Authenticating to the destination repository
Para realizar operaciones autenticadas en el registro {% data variables.product.prodname_registry %} de tu flujo de trabajo, puedes utilizar el `GITHUB_TOKEN`. {% data reusables.github-actions.github-token-permissions %}
To perform authenticated operations against the {% data variables.product.prodname_registry %} registry in your workflow, you can use the `GITHUB_TOKEN`. {% data reusables.github-actions.github-token-permissions %}
Si quieres publicar tu paquete en un repositorio diferente, debes utilizar un token de acceso personal (PAT) que tenga permisos de escritura en los paquetes del repositorio destino. Para obtener más información, consulta las secciones "[Crear un token de acceso personal](/github/authenticating-to-github/creating-a-personal-access-token)" y "[Secretos cifrados](/actions/reference/encrypted-secrets)".
If you want to publish your package to a different repository, you must use a personal access token (PAT) that has permission to write to packages in the destination repository. For more information, see "[Creating a personal access token](/github/authenticating-to-github/creating-a-personal-access-token)" and "[Encrypted secrets](/actions/reference/encrypted-secrets)."
### Ejemplo de flujo de trabajo
### Example workflow
Este ejemplo almacena el secreto `GITHUB_TOKEN` en la variable de entorno `NODE_AUTH_TOKEN`. Cuando la acción `setup-node` crea un archivo *.npmrc*, hace referencia al token de la variable de entorno `NODE_AUTH_TOKEN`.
This example stores the `GITHUB_TOKEN` secret in the `NODE_AUTH_TOKEN` environment variable. When the `setup-node` action creates an *.npmrc* file, it references the token from the `NODE_AUTH_TOKEN` environment variable.
```yaml{:copy}
name: Node.js Package
@@ -142,13 +142,13 @@ jobs:
registry-url: 'https://npm.pkg.github.com'
# Defaults to the user or organization that owns the workflow file
scope: '@octocat'
- run: npm install
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: {% raw %}${{ secrets.GITHUB_TOKEN }}{% endraw %}
```
La acción `setup-node` crea un archivo *.npmrc* en el ejecutor. Cuando utilizas la entrada `scope` a la acción `setup-node`, el archivo *.npmrc* incluye el prefijo de alcance. Por defecto, la acción `setup-node` establece el ámbito en el archivo *.npmrc* en la cuenta que contiene ese archivo de flujo de trabajo.
The `setup-node` action creates an *.npmrc* file on the runner. When you use the `scope` input to the `setup-node` action, the *.npmrc* file includes the scope prefix. By default, the `setup-node` action sets the scope in the *.npmrc* file to the account that contains that workflow file.
```ini
//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}
@@ -156,9 +156,9 @@ La acción `setup-node` crea un archivo *.npmrc* en el ejecutor. Cuando utilizas
always-auth=true
```
## Publicar paquetes mediante yarn
## Publishing packages using yarn
Si usas el gestor de paquetes Yarn, puedes instalar y publicar paquetes mediante Yarn.
If you use the Yarn package manager, you can install and publish packages using Yarn.
{% raw %}
```yaml{:copy}
@@ -185,25 +185,25 @@ jobs:
```
{% endraw %}
## Publicar paquetes en npm y {% data variables.product.prodname_registry %}
## Publishing packages to npm and {% data variables.product.prodname_registry %}
{% note %}
**Nota:** Si necesitas publicar en los registros que tienen diferentes prefijos de ámbito, deberás modificar el archivo *package.json* en el ejecutor para cambiar el prefijo de ámbito. Por ejemplo, si publicas un paquete en el ámbito `@mona` para npm y `@octocat` para {% data variables.product.prodname_registry %}, puedes reemplazar el ámbito `@mona` por `@octocat` en el archivo *package.json* del ejecutor después de publicar en npm y antes de publicar en {% data variables.product.prodname_registry %}.
**Note:** If you need to publish to registries that have different scope prefixes, you'll need to modify the *package.json* file on the runner to change the scope prefix. For example, if you publish a package to the `@mona` scope for npm and `@octocat` scope for {% data variables.product.prodname_registry %}, you can replace the `@mona` scope with `@octocat` in the *package.json* file on the runner after publishing to npm and before publishing to {% data variables.product.prodname_registry %}.
{% endnote %}
Puedes publicar tus paquetes tanto en el registro npm como en {% data variables.product.prodname_registry %} mediante la acción `setup-node` para cada registro.
You can publish your packages to both the npm registry and {% data variables.product.prodname_registry %} by using the `setup-node` action for each registry.
Si publicas un paquete en ambos registros, tendrás que asegurarte de que tu prefijo de ámbito en npm coincida con tu nombre de usuario u organización de {% data variables.product.prodname_dotcom %}. Para publicar paquetes en un registro público con un prefijo de ámbito, puedes utilizar el comando `npm publish --access public`. Para obtener más información, consulta [`npm-scope`](https://docs.npmjs.com/misc/scope) y "[Crear y publicar paquetes públicos con ámbitos](https://docs.npmjs.com/creating-and-publishing-scoped-public-packages)" en la documentación de npm.
If you publish a package to both registries, you'll need to ensure that your scope prefix on npm matches your {% data variables.product.prodname_dotcom %} user or organization name. To publish packages to a public registry with a scope prefix, you can use the command `npm publish --access public`. For more information, see [`npm-scope`](https://docs.npmjs.com/misc/scope) and "[Creating and publishing scoped public packages](https://docs.npmjs.com/creating-and-publishing-scoped-public-packages)" in the npm documentation.
Asegúrate de que tu archivo *package.json* incluya el ámbito de tu repositorio de {% data variables.product.prodname_dotcom %} y el registro de npm. Por ejemplo, si planeas publicar un paquete en el repositorio `octocat/npm-hello-world-test` en {% data variables.product.prodname_dotcom %} y https://www.npmjs. om/package/@octocat/npm-hello-world-test, el nombre en tu archivo *package.json* debería ser `"name": "@octocat/npm-hello-world-test"`.
Ensure your *package.json* file includes the scope of your {% data variables.product.prodname_dotcom %} repository and npm registry. For example, if you plan to publish a package in the `octocat/npm-hello-world-test` repository to {% data variables.product.prodname_dotcom %} and https://www.npmjs.com/package/@octocat/npm-hello-world-test, the name in your *package.json* file would be `"name": "@octocat/npm-hello-world-test"`.
Para realizar operaciones autenticadas en el registro {% data variables.product.prodname_registry %} de tu flujo de trabajo, puedes utilizar el `GITHUB_TOKEN`. {% data reusables.github-actions.github-token-permissions %}
To perform authenticated operations against the {% data variables.product.prodname_registry %} registry in your workflow, you can use the `GITHUB_TOKEN`. {% data reusables.github-actions.github-token-permissions %}
Cuando utilizas la entrada `scope` a la acción `setup-node`, la acción crea un archivo *.npmrc* que incluye el prefijo de alcance. Por defecto, la acción `setup-node` establece el ámbito en el archivo *.npmrc* al usuario u organización que posee el archivo de flujo de trabajo.
When you use the `scope` input to the `setup-node` action, the action creates an *.npmrc* file that includes the scope prefix. By default, the `setup-node` action sets the scope in the *.npmrc* file to the user or organization that owns the workflow file.
Este flujo de trabajo llama a la acción `setup-node` dos veces. Cada vez que se ejecuta la acción `setup-node`, sobrescribe el archivo *.npmrc*. El archivo *.npmrc* hace referencia al token que te permite realizar operaciones autenticadas frente al registro del paquete desde la variable de entorno `NODE_AUTH_TOKEN`. El flujo de trabajo establece la variable de entorno `NODE_AUTH_TOKEN` cada vez que se ejecuta el comando `npm publish`, primero con un token para publicar en el (`NPM_TOKEN`) de npm y luego con un token para publicar en el {% data variables.product.prodname_registry %} (`GITHUB_TOKEN`).
This workflow calls the `setup-node` action two times. Each time the `setup-node` action runs, it overwrites the *.npmrc* file. The *.npmrc* file references the token that allows you to perform authenticated operations against the package registry from the `NODE_AUTH_TOKEN` environment variable. The workflow sets the `NODE_AUTH_TOKEN` environment variable each time the `npm publish` command is run, first with a token to publish to npm (`NPM_TOKEN`) and then with a token to publish to {% data variables.product.prodname_registry %} (`GITHUB_TOKEN`).
```yaml{:copy}
@@ -224,7 +224,7 @@ jobs:
with:
node-version: '10.x'
registry-url: 'https://registry.npmjs.org'
- run: npm install
- run: npm ci
# Publish to npm
- run: npm publish --access public
env:{% raw %}

View File

@@ -46,7 +46,6 @@ The events listed in your security log are triggered by your actions. Actions ar
| Category name | Description
|------------------|-------------------{% ifversion fpt or ghec %}
| [`account_recovery_token`](#account_recovery_token-category-actions) | Contains all activities related to [adding a recovery token](/articles/configuring-two-factor-authentication-recovery-methods).
| [`billing`](#billing-category-actions) | Contains all activities related to your billing information.
| [`codespaces`](#codespaces-category-actions) | Contains all activities related to {% data variables.product.prodname_codespaces %}. For more information, see "[About {% data variables.product.prodname_codespaces %}](/github/developing-online-with-codespaces/about-codespaces)."
| [`marketplace_agreement_signature`](#marketplace_agreement_signature-category-actions) | Contains all activities related to signing the {% data variables.product.prodname_marketplace %} Developer Agreement.
@@ -77,14 +76,6 @@ An overview of some of the most common actions that are recorded as events in th
{% ifversion fpt or ghec %}
### `account_recovery_token` category actions
| Action | Description
|------------------|-------------------
| `confirm` | Triggered when you successfully [store a new token with a recovery provider](/articles/configuring-two-factor-authentication-recovery-methods).
| `recover` | Triggered when you successfully [redeem an account recovery token](/articles/recovering-your-account-if-you-lose-your-2fa-credentials).
| `recover_error` | Triggered when a token is used but {% data variables.product.prodname_dotcom %} is not able to validate it.
### `billing` category actions
| Action | Description

View File

@@ -1,6 +1,6 @@
---
title: Recuperar tu cuenta si pierdes tus credenciales 2FA
intro: 'Si pierdes el acceso a tus credenciales de autenticación de dos factores, puedes utilizar tus códigos de recuperación, o cualquier otra opción de recuperación, para recuperar el acceso a tu cuenta.'
title: Recovering your account if you lose your 2FA credentials
intro: 'If you lose access to your two-factor authentication credentials, you can use your recovery codes, or another recovery option, to regain access to your account.'
redirect_from:
- /articles/recovering-your-account-if-you-lost-your-2fa-credentials/
- /articles/authenticating-with-an-account-recovery-token/
@@ -13,93 +13,75 @@ versions:
ghec: '*'
topics:
- 2FA
shortTitle: Recuperar una cuenta con 2FA
shortTitle: Recover an account with 2FA
---
{% ifversion fpt or ghec %}
{% warning %}
**Advertencia**: {% data reusables.two_fa.support-may-not-help %}
**Warning**: {% data reusables.two_fa.support-may-not-help %}
{% endwarning %}
{% endif %}
## Utilizar un código de recuperación de autenticación de dos factores
## Using a two-factor authentication recovery code
Utiliza uno de tus códigos de recuperación para recuperar automáticamente el ingreso a tu cuenta. Es posible que hayas guardado tus códigos de recuperación en un administrador de contraseñas o en la carpeta de descargas de tu computadora. El nombre de archivo por defecto para códigos de recuperación es `github-recovery-codes.txt`. Para obtener más información acerca de códigos de recuperación, consulta "[Configurar métodos de recuperación de autenticación de dos factores](/articles/configuring-two-factor-authentication-recovery-methods#downloading-your-two-factor-authentication-recovery-codes)."
Use one of your recovery codes to automatically regain entry into your account. You may have saved your recovery codes to a password manager or your computer's downloads folder. The default filename for recovery codes is `github-recovery-codes.txt`. For more information about recovery codes, see "[Configuring two-factor authentication recovery methods](/articles/configuring-two-factor-authentication-recovery-methods#downloading-your-two-factor-authentication-recovery-codes)."
{% data reusables.two_fa.username-password %}{% ifversion fpt or ghec %}
2. Da clic en **Ingresar un código de recuperación de dos factores** debajo de "¿Tienes Problemas?". ![Link to use a recovery code](/assets/images/help/2fa/2fa-recovery-code-link.png){% else %}
2. En la página 2FA, dentro de "Don't have your phone?" (¿No tienes tu teléfono?), haz clic en **Enter a two-factor recovery code (Ingresar un código de recuperación de dos factores)**. ![Link to use a recovery code](/assets/images/help/2fa/2fa_recovery_dialog_box.png){% endif %}
3. Escribe uno de tus códigos de recuperación, después haz clic en **Verify (Verificar)**. ![Campo para escribir un código de recuperación y botón Verificar](/assets/images/help/2fa/2fa-type-verify-recovery-code.png)
2. Under "Having Problems?", click **Enter a two-factor recovery code**.
![Link to use a recovery code](/assets/images/help/2fa/2fa-recovery-code-link.png){% else %}
2. On the 2FA page, under "Don't have your phone?", click **Enter a two-factor recovery code**.
![Link to use a recovery code](/assets/images/help/2fa/2fa_recovery_dialog_box.png){% endif %}
3. Type one of your recovery codes, then click **Verify**.
![Field to type a recovery code and Verify button](/assets/images/help/2fa/2fa-type-verify-recovery-code.png)
{% ifversion fpt or ghec %}
## Autenticar con un número de reserva
## Authenticating with a fallback number
Si pierdes el acceso a tu app TOTP principal o número de teléfono, puedes proporcionar un código de autenticación de dos factores enviado a tu número de reserva para recuperar automáticamente el acceso a tu cuenta.
If you lose access to your primary TOTP app or phone number, you can provide a two-factor authentication code sent to your fallback number to automatically regain access to your account.
{% endif %}
## Autenticar con una clave de seguridad
## Authenticating with a security key
Si has configurado autenticación de dos factores utilizando una clave de seguridad, puedes utilizar tu clave de seguridad como un método de autenticación secundario para obtener acceso a tu cuenta automáticamente. Para obtener más información, consulta "[Configurar autenticación de dos factores](/articles/configuring-two-factor-authentication#configuring-two-factor-authentication-using-a-security-key)".
If you configured two-factor authentication using a security key, you can use your security key as a secondary authentication method to automatically regain access to your account. For more information, see "[Configuring two-factor authentication](/articles/configuring-two-factor-authentication#configuring-two-factor-authentication-using-a-security-key)."
{% ifversion fpt or ghec %}
## Autentificarse con un dispositivo verificado, token SSH, o token de acceso personal
## Authenticating with a verified device, SSH token, or personal access token
Si conoces tu contraseña de {% data variables.product.product_name %} pero no tienes credenciales o códigos de autenticación bifactorial, se te puede enviar una contraseña de única ocasión a tu dirección de correo electrónico verificada para comenzar con el proceso de verificación y volver a obtener acceso a tu cuenta.
If you know your {% data variables.product.product_name %} password but don't have the two-factor authentication credentials or your two-factor authentication recovery codes, you can have a one-time password sent to your verified email address to begin the verification process and regain access to your account.
{% note %}
**Nota**: Por razones de seguridad, recobrar el acceso a tu cuenta autenticándose con una contraseña de una sola ocasión puede demorar de 3 a 5 días hábiles. Las solicitudes adicionales emitidas durante este periodo no se revisarán.
**Note**: For security reasons, regaining access to your account by authenticating with a one-time password can take 3-5 business days. Additional requests submitted during this time will not be reviewed.
{% endnote %}
Puedes utilizar tus credenciales de autenticación de dos factores para recobrar el acceso a tu cuenta en cualquier momento durante el periodo de espera de 3 a 5 días.
You can use your two-factor authentication credentials or two-factor authentication recovery codes to regain access to your account anytime during the 3-5 day waiting period.
1. Teclea tu nombre de usuario y contraseña en el prompt de autenticación. Si no conoces tu contraseña de {% data variables.product.product_name %}, no podrás generar una contraseña de una sola ocasión.
2. Da clic en **¿No puedes acceder a tu dispositivo de dos factores o a tus códigos de recuperación válidos?** debajo de "¿Tienes Problemas ![Enlace si no tienes tu dispositivo de 2fa o códigos de recuperación](/assets/images/help/2fa/no-access-link.png)
3. Da clic en **Entiendo, comenzar** para solicitar un restablecimiento de tu configuración de autenticación. ![Botón de restablecimiento de configuración de autenticación](/assets/images/help/2fa/reset-auth-settings.png)
4. Da clic en **Enviar contraseña de una sola vez** para enviarla a todas las direcciones de correo electrónico asociadas con tu cuenta. ![Botón para enviar contraseña de una sola vez](/assets/images/help/2fa/send-one-time-password.png)
5. Teclea la contraseña recibida en el correo electrónico de recuperación debajo de "Contraseña de una sola vez"{% data variables.product.prodname_dotcom %}. ![Campo para contraseña de una sola vez](/assets/images/help/2fa/one-time-password-field.png)
6. Da clic en **Verificar dirección de correo electrónico**.
7. Escoge un factor de verificación alterno.
- Si utilizaste tu dispositivo actual para ingresar en esta cuenta anteriormente y te gustaría utilizarlo para verificación, haz clic en **Verificar con este dispositivo**.
- Si has configurado una llave SSH previamente en esta cuenta y quieres utilizarla para verificación, da clic en **Llave SSH**.
- Si configuraste un token de acceso personal previamente y te gustaría utilizarlo para verificación, da clic en **Token de acceso personal**. ![Botones de verificación alternativa](/assets/images/help/2fa/alt-verifications.png)
8. Un miembro de {% data variables.contact.github_support %} revisará tu solicitud y te enviará un mensaje de correo electrónico dentro de los siguientes 3 a 5 días. Si se aprueba tu solicitud, recibirás un enlace para completar el proceso de recuperación de tu cuenta. Si se te niega la solicitud, el mensaje incluirá un medio para contactar a soporte con cualquier pregunta adicional.
1. Type your username and password to prompt authentication. If you do not know your {% data variables.product.product_name %} password, you will not be able to generate a one-time password.
2. Under "Having Problems?", click **Can't access your two factor device or valid recovery codes?**
![Link if you don't have your 2fa device or recovery codes](/assets/images/help/2fa/no-access-link.png)
3. Click **I understand, get started** to request a reset of your authentication settings.
![Reset authentication settings button](/assets/images/help/2fa/reset-auth-settings.png)
4. Click **Send one-time password** to send a one-time password to all email addresses associated with your account.
![Send one-time password button](/assets/images/help/2fa/send-one-time-password.png)
5. Under "One-time password", type the temporary password from the recovery email {% data variables.product.prodname_dotcom %} sent.
![One-time password field](/assets/images/help/2fa/one-time-password-field.png)
6. Click **Verify email address**.
7. Choose an alternative verification factor.
- If you've used your current device to log into this account before and would like to use the device for verification, click **Verify with this device**.
- If you've previously set up an SSH key on this account and would like to use the SSH key for verification, click **SSH key**.
- If you've previously set up a personal access token and would like to use the personal access token for verification, click **Personal access token**.
![Alternative verification buttons](/assets/images/help/2fa/alt-verifications.png)
8. A member of {% data variables.contact.github_support %} will review your request and email you within 3-5 business days. If your request is approved, you'll receive a link to complete your account recovery process. If your request is denied, the email will include a way to contact support with any additional questions.
## Autenticar con un token de recuperación de cuenta
{% warning %}
**Advertencia:** Los tokens de recuperación de cuenta se obsoletizaron y se inhabilitarán el **1 de diciembre de 2021**. Por favor, asegúrate de haber configurado otros métodos de recuperación bifactoriales. Para obtener más información, consulta la sección "[Configurar los métodos de autenticación bifactoriales](/articles/configuring-two-factor-authentication-recovery-methods)".
{% endwarning %}
If you lose access to the two-factor authentication methods for your account on {% data variables.product.product_location %}, you can retrieve your account recovery token from a partner recovery provider and ask {% data variables.product.prodname_dotcom %} Support to review it.
Si no tienes acceso a tus métodos de autenticación de dos factores o a tus códigos de recuperación y has almacenado un token de recuperación de cuenta con Facebook utilizando Recuperar cuentas en otro lugar, puedes utilizar tu token para recuperar el acceso a tu cuenta.
Si te es imposible recuperar el acceso a tu cuenta, genera una contraseña de una sola vez para recuperarlo. Para obtener más información, consulta "[Autenticarse con un dispositivo verificado, token, ssh, o token de acceso personal](#authenticating-with-a-verified-device-ssh-token-or-personal-access-token)".
{% warning %}
**Advertencias:**
- Antes de recuperar un token de recuperación de cuenta, deberías tratar de utilizar tus [códigos de autenticación de dos factores](/articles/accessing-github-using-two-factor-authentication) o tus códigos de recuperación de autenticación de dos factores para recuperar el acceso a tu cuenta. Para obtener más información, consulta "[Recuperar tu cuenta si pierdes tus credenciales de 2FA](/articles/recovering-your-account-if-you-lose-your-2fa-credentials)".
{% endwarning %}
1. En Facebook, desplázate hasta tus [Configuraciones de seguridad](https://www.facebook.com/settings?tab=security), después haz clic en **Recover Accounts Elsewhere (Recuperar cuentas en otro lugar)**. ![Página de configuraciones de seguridad de Facebook con enlace Recuperar cuentas en otro lugar](/assets/images/help/settings/security-facebook-security-settings-page.png)
2. Click the recovery token associated with your account on {% data variables.product.product_location %}. ![Lista de tokens de recuperación almacenados en Facebook](/assets/images/help/settings/security-github-rae-token-on-facebook.png)
3. Para rescatar tu token de recuperación de cuenta, haz clic en **Recover This Account (Recuperar esta cuenta)**. Se abrirá una nueva ventana, que te llevará de vuelta a {% data variables.product.product_name %}. ![Casilla modal con información acerca de tu token de recuperación y botón Recuperar esta cuenta](/assets/images/help/settings/security-recover-account-facebook.png)
4. Contacta a {% data variables.contact.contact_support %} para hacerles saber que tu token de recuperación de cuenta está lista para revisión.
{% endif %}
## Leer más
## Further reading
- "[Acerca de la autenticación de dos factores](/articles/about-two-factor-authentication)"
- [Configurar autenticación de dos factores](/articles/configuring-two-factor-authentication)"
- [Configurar métodos de recuperación de autenticación de dos factores](/articles/configuring-two-factor-authentication-recovery-methods)"
- "[Acceder {% data variables.product.prodname_dotcom %} utilizando autenticación de dos factores](/articles/accessing-github-using-two-factor-authentication)"
- "[About two-factor authentication](/articles/about-two-factor-authentication)"
- "[Configuring two-factor authentication](/articles/configuring-two-factor-authentication)"
- "[Configuring two-factor authentication recovery methods](/articles/configuring-two-factor-authentication-recovery-methods)"
- "[Accessing {% data variables.product.prodname_dotcom %} using two-factor authentication](/articles/accessing-github-using-two-factor-authentication)"

View File

@@ -14,15 +14,21 @@ topics:
{% data reusables.cli.cli-extensions %} For more information about how to use {% data variables.product.prodname_cli %} extensions, see "[Using {% data variables.product.prodname_cli %} extensions](/github-cli/github-cli/using-github-cli-extensions)."
You need a repository for each extension that you create. The repository name must start with `gh-`. The rest of the repository name is the name of the extension. At the root of the repository, there must be an executable file with the same name as the repository. This file will be executed when the extension is invoked.
You need a repository for each extension that you create. The repository name must start with `gh-`. The rest of the repository name is the name of the extension. The repository must have an executable file at its root with the same name as the repository or a set of precompiled binary executables attached to a release.
{% note %}
**Note**: We recommend that the executable file is a bash script because bash is a widely available interpreter. You may use non-bash scripts, but the user must have the necessary interpreter installed in order to use the extension.
**Note**: When relying on an executable script, we recommend using a bash script because bash is a widely available interpreter. You may use non-bash scripts, but the user must have the necessary interpreter installed in order to use the extension. If you would prefer to not rely on users having interpreters installed, consider a precompiled extension.
{% endnote %}
## Creating an extension with `gh extension create`
## Creating an interpreted extension with `gh extension create`
{% note %}
**Note**: Running `gh extension create` with no arguments will start an interactive wizard.
{% endnote %}
You can use the `gh extension create` command to create a project for your extension, including a bash script that contains some starter code.
@@ -34,7 +40,35 @@ You can use the `gh extension create` command to create a project for your exten
1. Follow the printed instructions to finalize and optionally publish your extension.
## Creating an extension manually
## Creating a precompiled extension in Go with `gh extension create`
You can use the `--precompiled=go` argument to create a Go-based project for your extension, including Go scaffolding, workflow scaffolding, and starter code.
1. Set up a new extension by using the `gh extension create` subcommand. Replace `EXTENSION-NAME` with the name of your extension and specify `--precompiled=go`.
```shell
gh extension create --precompiled=go <em>EXTENSION-NAME</em>
```
1. Follow the printed instructions to finalize and optionally publish your extension.
## Creating a non-Go precompiled extension with `gh extension create`
You can use the `--precompiled=other` argument to create a project for your non-Go precompiled extension, including workflow scaffolding.
1. Set up a new extension by using the `gh extension create` subcommand. Replace `EXTENSION-NAME` with the name of your extension and specify `--precompiled=other`.
```shell
gh extension create --precompiled=other <em>EXTENSION-NAME</em>
```
1. Add some initial code for your extension in your compiled language of choice.
1. Fill in `script/build.sh` with code to build your extension to ensure that your extension can be built automatically.
1. Follow the printed instructions to finalize and optionally publish your extension.
## Creating an interpreted extension manually
1. Create a local directory called `gh-EXTENSION-NAME` for your extension. Replace `EXTENSION-NAME` with the name of your extension. For example, `gh-whoami`.
@@ -56,7 +90,7 @@ You can use the `gh extension create` command to create a project for your exten
1. From your directory, install the extension as a local extension.
```bash
```shell
gh extension install .
```
@@ -70,13 +104,13 @@ You can use the `gh extension create` command to create a project for your exten
```shell
git init -b main
git add . && git commit -m "initial commit"
gh repo create gh-<em>EXTENSION-NAME</em> --source=. --public --push
git add . && git commit -m "initial commit"
gh repo create gh-<em>EXTENSION-NAME</em> --source=. --public --push
```
1. Optionally, to help other users discover your extension, add the repository topic `gh-extension`. This will make the extension appear on the [`gh-extension` topic page](https://github.com/topics/gh-extension). For more information about how to add a repository topic, see "[Classifying your repository with topics](/github/administering-a-repository/managing-repository-settings/classifying-your-repository-with-topics)."
## Tips for writing {% data variables.product.prodname_cli %} extensions
## Tips for writing interpreted {% data variables.product.prodname_cli %} extensions
### Handling arguments and flags
@@ -120,34 +154,128 @@ fi
### Calling core commands in non-interactive mode
Some {% data variables.product.prodname_cli %} core commands will prompt the user for input. When scripting with those commands, a prompt is often undesirable. To avoid prompting, supply the necessary information explicitly via arguments.
Some {% data variables.product.prodname_cli %} core commands will prompt the user for input. When scripting with those commands, a prompt is often undesirable. To avoid prompting, supply the necessary information explicitly via arguments.
For example, to create an issue programmatically, specify the title and body:
```bash
```shell
gh issue create --title "My Title" --body "Issue description"
```
### Fetching data programatically
Many core commands support the `--json` flag for fetching data programatically. For example, to return a JSON object listing the number, title, and mergeability status of pull requests:
```bash
```shell
gh pr list --json number,title,mergeStateStatus
```
If there is not a core command to fetch specific data from GitHub, you can use the [`gh api`](https://cli.github.com/manual/gh_api) command to access the GitHub API. For example, to fetch information about the current user:
```bash
```shell
gh api user
```
All commands that output JSON data also have options to filter that data into something more immediately usable by scripts. For example, to get the current user's name:
```bash
```shell
gh api user --jq '.name'
```
For more information, see [`gh help formatting`](https://cli.github.com/manual/gh_help_formatting).
## Creating a precompiled extension manually
1. Create a local directory called `gh-EXTENSION-NAME` for your extension. Replace `EXTENSION-NAME` with the name of your extension. For example, `gh-whoami`.
1. In the directory you created, add some source code. For example:
```go
package main
import (
"github.com/cli/go-gh"
"fmt"
)
func main() {
args := []string{"api", "user", "--jq", `"You are @\(.login) (\(.name))"` }
stdOut, _, err := gh.Exec(args...)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(stdOut.String())
}
```
1. From your directory, install the extension as a local extension.
```shell
gh extension install .
```
1. Build your code. For example, with Go, replacing `YOUR-USERNAME` with your GitHub username:
```shell
go mod init github.com/<em>YOUR-USERNAME</em>/gh-whoami
go mod tidy
go build
```
1. Verify that your extension works. Replace `EXTENSION-NAME` with the name of your extension. For example, `whoami`.
```shell
gh <em>EXTENSION-NAME</em>
```
1. From your directory, create a repository to publish your extension. Replace `EXTENSION-NAME` with the name of your extension.
{% note %}
**Note:** Be careful not to commit the binary produced by your compilation step to version control.
{% endnote %}
```shell
git init -b main
echo "gh-<em>EXTENSION-NAME</em>" >> .gitignore
git add main.go go.* .gitignore && git commit -m'Initial commit'
gh repo create "gh-<em>EXTENSION-NAME</em>"
```
1. Create a release to share your precompiled extension with others. Compile for each platform you want to support, attaching each binary to a release as an asset. Binary executables attached to releases must follow a naming convention and have a suffix of <em>OS-ARCHITECTURE\[EXTENSION\]</em>.
For example, an extension named `whoami` compiled for Windows 64bit would have the name `gh-whoami-windows-amd64.exe` while the same extension compiled for Linux 32bit would have the name `gh-whoami-linux-386`. To see an exhaustive list of OS and architecture combinations recognized by `gh`, see [this source code](https://github.com/cli/cli/blob/14f704fd0da58cc01413ee4ba16f13f27e33d15e/pkg/cmd/extension/manager.go#L696).
{% note %}
**Note:** For your extension to run properly on Windows, its asset file must have a `.exe` extension. No extension is needed for other operating systems.
{% endnote %}
Releases can be created from the command line. For example:
```shell
git tag v1.0.0
git push origin v1.0.0
GOOS=windows GOARCH=amd64 go build -o gh-<em>EXTENSION-NAME</em>-windows-amd64.exe
GOOS=linux GOARCH=amd64 go build -o gh-<em>EXTENSION-NAME</em>-linux-amd64
GOOS=darwin GOARCH=amd64 go build -o gh-<em>EXTENSION-NAME</em>-darwin-amd64
gh release create v1.0.0 ./*amd64*
1. Optionally, to help other users discover your extension, add the repository topic `gh-extension`. This will make the extension appear on the [`gh-extension` topic page](https://github.com/topics/gh-extension). For more information about how to add a repository topic, see "[Classifying your repository with topics](/github/administering-a-repository/managing-repository-settings/classifying-your-repository-with-topics)."
## Tips for writing precompiled {% data variables.product.prodname_cli %} extensions
### Automating releases
Consider adding the [gh-extension-precompile](https://github.com/cli/gh-extension-precompile) action to a workflow in your project. This action will automatically produce cross-compiled Go binaries for your extension and supplies build scaffolding for non-Go precompiled extensions.
### Using {% data variables.product.prodname_cli %} features from Go-based extensions
Consider using [go-gh](https://github.com/cli/go-gh), a Go library that exposes pieces of `gh` functionality for use in extensions.
## Next steps
To see more examples of {% data variables.product.prodname_cli %} extensions, look at [repositories with the `gh-extension` topic](https://github.com/topics/gh-extension).

View File

@@ -6,10 +6,6 @@
term: token de acceso
description: >-
Un token que se usa en lugar de una contraseña cuando se realizan operaciones Git a través de HTTPS con Git en la línea de comandos o la API. También denominado un token de acceso personal.
-
term: token de recuperación de cuenta
description: >-
**Se obsoletizó y se inhabilitará el 1 de diciembre de 2021.** La credencial de autenticación que se almacena como parte de una configuración de recuperación de cuenta llamada Recover Accounts Elswhere que te permite almacenar esta credencial de respaldo.
-
term: Vista previa de API
description: >-
@@ -181,13 +177,13 @@
-
term: rama predeterminada
description: >-
La rama base para todas las solicitudes de cam bio y confirmaciones de código en un repositorio. Cada repositorio tiene por lo menos una rama, la cual crea Git cuando lo inicializas. La rama principal a menudo se llama {% ifversion ghes < 3.2 %} 'master'{% else %}'main'{% endif %}, y habitualmente es la rama predeterminada.
The base branch for new pull requests and code commits in a repository. Each repository has at least one branch, which Git creates when you initialize the repository. The first branch is usually called {% ifversion ghes < 3.2 %}`master`{% else %}`main`{% endif %}, and is often the default branch.
-
term: gráfica de dependientes
term: dependents graph
description: >-
Un gráfico del repositorio que muestra los paquetes, los proyectos y los repositorios que dependen de un repositorio público.
-
term: gráfica de dependencias
term: dependency graph
description: >-
Un gráfico del repositorio que muestra los paquetes y los proyectos de los que depende el respositorio.
-
@@ -252,7 +248,7 @@
-
term: gist
description: >-
Un gist es un archivo que se puede compartir y que editas, clonas y bifurcas en GitHub. Puedes hacer que un gist sea {% ifversion ghae %}interno{% else %}público{% endif %} o secreto, aunque los gists secretos estarán disponibles para {% ifversion ghae %}cualquier miembro de la empresa{% else %}cualquiera{% endif %} que tenga la URL.
A gist is a shareable file that you can edit, clone, and fork on GitHub. You can make a gist {% ifversion ghae %}internal{% else %}public{% endif %} or secret, although secret gists will be available to {% ifversion ghae %}any enterprise member{% else %}anyone{% endif %} with the URL.
-
term: Git
description: >-
@@ -377,7 +373,7 @@
description: >-
Una cuenta personal a la que el usuario no puede acceder. Las cuentas se bloquean cuando los usuarios degradan su cuenta paga a una gratis o si su plan de pago se venció.
-
term: consola de administración
term: management console
description: >-
Una sección dentro de la interfaz GitHub Enterprise que contiene funciones administrativas.
-
@@ -396,7 +392,7 @@
description: >-
La rama predeterminada en muchos de los repositorios de Git. Predeterminadamente, cuando creas un repositorio de Git nuevo en la línea de comandos, se creará una rama denominada 'master'. Hoy en día, muchas herramientas utilizan un nombre alterno para la rama predeterminada.{% ifversion fpt or ghes > 3.1 or ghae %} Por ejemplo, cuando creas un repositorio nuevo en GitHub, la rama predeterminada se llama 'main'.{% endif %}
-
term: gráfico de miembros
term: members graph
description: Un gráfico del repositorio que muestra todas las bifurcaciones de un repositorio.
-
term: mención
@@ -422,7 +418,7 @@
description: >-
Un equipo hijo de un equipo padre. Puedes tener varios equipos hijo (o anidados).
-
term: gráfica de Red
term: network graph
description: >-
Un gráfico del repositorio que muestra el historial de la rama de toda la red del repositorio, incluidas las ramas del repositorio raíz y las ramas de las bifurcaciones que contienen confirmaciones de cambios únicas para la red.
-
@@ -543,10 +539,10 @@
description: >-
Los comentarios de los colaboradores en una solicitud de extracción que aprueban los cambios o solicitan otros cambios antes de fusionar la solicitud de extracción.
-
term: gráfico de pulso
term: pulse graph
description: Un gráfico del repositorio que te brinda una descripción de la actividad de un repositorio.
-
term: gráfico de perforado
term: punch graph
description: >-
Un gráfico del repositorio que muestra la frecuencia de las actualizaciones para un repositorio en función del día de la semana y la hora del día.
-
@@ -571,10 +567,6 @@
term: rebase
description: >-
Volver a aplicar una serie de cambios de una rama a una base diferente y restablecer el HEAD de esa rama al resultado.
-
term: Recuperar cuentas en otro lugar
description: >-
**Se obsoletizó y se inhabilitará el 1 de diciembre de 2021.** Permite a los usuarios agregar un factor de seguridad adicional a su cuenta de GitHub en caso de que pierdan acceso a su método de autenticación bifactorial o códigos de recuperación. Los usuarios pueden asociar su cuenta de GitHub con su cuenta de Facebook si almacenan la credencial de autenticación como un token de recuperación de cuenta con Facebook.
-
term: código de recuperación
description: Un código que te ayuda a volver a tener acceso a tu cuenta de GitHub.

View File

@@ -76,16 +76,6 @@
- RemovedFromProjectEvent.projectColumnName
owning_teams:
- '@github/github-projects'
-
title: Crear adjuntos de contenido
description: Esta vista previa agrega soporte para crear adjuntos de contenido.
toggled_by: ':corsair-preview'
announcement: null
updates: null
toggled_on:
- Mutation.createContentAttachment
owning_teams:
- '@github/feature-lifecycle'
-
title: Vista Previa de Etiquetas
description: >-

View File

@@ -93,16 +93,6 @@
- RemovedFromProjectEvent.projectColumnName
owning_teams:
- '@github/github-projects'
-
title: Crear adjuntos de contenido
description: Esta vista previa agrega soporte para crear adjuntos de contenido.
toggled_by: ':corsair-preview'
announcement: null
updates: null
toggled_on:
- Mutation.createContentAttachment
owning_teams:
- '@github/feature-lifecycle'
-
title: Vista Previa de Etiquetas
description: >-

View File

@@ -93,16 +93,6 @@
- RemovedFromProjectEvent.projectColumnName
owning_teams:
- '@github/github-projects'
-
title: Crear adjuntos de contenido
description: Esta vista previa agrega soporte para crear adjuntos de contenido.
toggled_by: ':corsair-preview'
announcement: null
updates: null
toggled_on:
- Mutation.createContentAttachment
owning_teams:
- '@github/feature-lifecycle'
-
title: Vista Previa de Etiquetas
description: >-

View File

@@ -78,6 +78,7 @@ translations/es-ES/content/actions/index.md,Listed in localization-support#489
translations/es-ES/content/actions/index.md,rendering error
translations/es-ES/content/actions/learn-github-actions/contexts.md,Listed in localization-support#489
translations/es-ES/content/actions/learn-github-actions/contexts.md,rendering error
translations/es-ES/content/actions/learn-github-actions/creating-workflow-templates.md,rendering error
translations/es-ES/content/actions/learn-github-actions/environment-variables.md,Listed in localization-support#489
translations/es-ES/content/actions/learn-github-actions/environment-variables.md,rendering error
translations/es-ES/content/actions/learn-github-actions/events-that-trigger-workflows.md,Listed in localization-support#489
@@ -100,6 +101,7 @@ translations/es-ES/content/actions/managing-workflow-runs/skipping-workflow-runs
translations/es-ES/content/actions/monitoring-and-troubleshooting-workflows/adding-a-workflow-status-badge.md,rendering error
translations/es-ES/content/actions/publishing-packages/publishing-docker-images.md,rendering error
translations/es-ES/content/actions/publishing-packages/publishing-java-packages-with-gradle.md,rendering error
translations/es-ES/content/actions/publishing-packages/publishing-nodejs-packages.md,rendering error
translations/es-ES/content/actions/quickstart.md,Listed in localization-support#489
translations/es-ES/content/actions/quickstart.md,rendering error
translations/es-ES/content/actions/security-guides/automatic-token-authentication.md,Listed in localization-support#489
@@ -260,6 +262,7 @@ translations/es-ES/content/authentication/managing-commit-signature-verification
translations/es-ES/content/authentication/managing-commit-signature-verification/signing-commits.md,rendering error
translations/es-ES/content/authentication/securing-your-account-with-two-factor-authentication-2fa/about-two-factor-authentication.md,rendering error
translations/es-ES/content/authentication/securing-your-account-with-two-factor-authentication-2fa/changing-two-factor-authentication-delivery-methods-for-your-mobile-device.md,rendering error
translations/es-ES/content/authentication/securing-your-account-with-two-factor-authentication-2fa/recovering-your-account-if-you-lose-your-2fa-credentials.md,rendering error
translations/es-ES/content/authentication/troubleshooting-ssh/error-ssh-add-illegal-option----k.md,Listed in localization-support#489
translations/es-ES/content/authentication/troubleshooting-ssh/error-ssh-add-illegal-option----k.md,rendering error
translations/es-ES/content/billing/index.md,rendering error
1 file reason
78 translations/es-ES/content/actions/index.md rendering error
79 translations/es-ES/content/actions/learn-github-actions/contexts.md Listed in localization-support#489
80 translations/es-ES/content/actions/learn-github-actions/contexts.md rendering error
81 translations/es-ES/content/actions/learn-github-actions/creating-workflow-templates.md rendering error
82 translations/es-ES/content/actions/learn-github-actions/environment-variables.md Listed in localization-support#489
83 translations/es-ES/content/actions/learn-github-actions/environment-variables.md rendering error
84 translations/es-ES/content/actions/learn-github-actions/events-that-trigger-workflows.md Listed in localization-support#489
101 translations/es-ES/content/actions/monitoring-and-troubleshooting-workflows/adding-a-workflow-status-badge.md rendering error
102 translations/es-ES/content/actions/publishing-packages/publishing-docker-images.md rendering error
103 translations/es-ES/content/actions/publishing-packages/publishing-java-packages-with-gradle.md rendering error
104 translations/es-ES/content/actions/publishing-packages/publishing-nodejs-packages.md rendering error
105 translations/es-ES/content/actions/quickstart.md Listed in localization-support#489
106 translations/es-ES/content/actions/quickstart.md rendering error
107 translations/es-ES/content/actions/security-guides/automatic-token-authentication.md Listed in localization-support#489
262 translations/es-ES/content/authentication/managing-commit-signature-verification/signing-commits.md rendering error
263 translations/es-ES/content/authentication/securing-your-account-with-two-factor-authentication-2fa/about-two-factor-authentication.md rendering error
264 translations/es-ES/content/authentication/securing-your-account-with-two-factor-authentication-2fa/changing-two-factor-authentication-delivery-methods-for-your-mobile-device.md rendering error
265 translations/es-ES/content/authentication/securing-your-account-with-two-factor-authentication-2fa/recovering-your-account-if-you-lose-your-2fa-credentials.md rendering error
266 translations/es-ES/content/authentication/troubleshooting-ssh/error-ssh-add-illegal-option----k.md Listed in localization-support#489
267 translations/es-ES/content/authentication/troubleshooting-ssh/error-ssh-add-illegal-option----k.md rendering error
268 translations/es-ES/content/billing/index.md rendering error