Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Publish step hanging with partial success - possible globbing issue

Abierto
#375 3 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
42/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
github, javascript
Área
release

Línea de trabajo

Comienza en lib/publish.js, en los puntos referenciados alrededor de las líneas 34 y 56, y luego compara las dos configuraciones de assets en .releaserc.yml. Reproduce el paso de publicación con el glob '**' y con dist/*.tgz, y usa la salida de depuración para aislar el paso del glob. Se considera terminado cuando el glob configurado ya no deja colgada la publicación y el release se completa con los assets previstos.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

My issue seems very similar to this closed issue - https://github.com/semantic-release/github/issues/193 - but since that is closed and a couple of years old I figured it might not be relevant.

Even with debug logging turned on, the logs go silent after this log message - https://github.com/semantic-release/github/blob/master/lib/publish.js#L34 . The draft release is created correctly, we just never seem to make it as far as https://github.com/semantic-release/github/blob/master/lib/publish.js#L56 as we never get any additional debug logging. So it seems perhaps there is an issue with the glob step.

The complete log entries from release that are relevant to github plugin are shown below.

[3:29:08 PM] [semantic-release] › ✔  Loaded plugin "verifyConditions" from "@semantic-release/github"
    '  export RELEASE_VERSION="$RELEASE_VERSION"\n' +
...
2021-05-26T15:29:08.805Z semantic-release:plugins options for @semantic-release/github/verifyConditions: {
  assets: [ { path: '**', label: 'distribution files' } ],
  failComment: false,
  successComment: false
}
...
2021-05-26T15:29:08.805Z semantic-release:plugins options for @semantic-release/github/verifyConditions: {
  assets: [ { path: '**', label: 'distribution files' } ],
  failComment: false,
  successComment: false
}
...
[3:29:08 PM] [semantic-release] › ✔  Loaded plugin "publish" from "@semantic-release/github"
...
[3:29:08 PM] [semantic-release] › ✔  Loaded plugin "addChannel" from "@semantic-release/github"
2021-05-26T15:29:08.811Z semantic-release:plugins options for @semantic-release/github/success: {
  assets: [ { path: '**', label: 'distribution files' } ],
  failComment: false,
  successComment: false
}
...
2021-05-26T15:29:08.812Z semantic-release:plugins options for @semantic-release/github/fail: {
  assets: [ { path: '**', label: 'distribution files' } ],
  failComment: false,
  successComment: false
}
...
[3:29:08 PM] [semantic-release] › ✔  Loaded plugin "success" from "@semantic-release/github"
...
[3:29:08 PM] [semantic-release] › ✔  Loaded plugin "fail" from "@semantic-release/github"
...
[3:29:13 PM] [semantic-release] › ℹ  Start step "verifyConditions" of plugin "@semantic-release/github"
[3:29:13 PM] [semantic-release] [@semantic-release/github] › ℹ  Verify GitHub authentication (https://api.github.com)
[3:29:13 PM] [semantic-release] › ✔  Completed step "verifyConditions" of plugin "@semantic-release/github"
...
[3:29:20 PM] [semantic-release] › ℹ  Start step "publish" of plugin "@semantic-release/github"
2021-05-26T15:29:20.072Z semantic-release:github release object: {
  owner: 'onelive-dev',
  repo: 'OLX',
  tag_name: 'v1.5.0-cicd.3',
  target_commitish: 'cicd',
  name: 'v1.5.0-cicd.3',
  body: '# [1.5.0-cicd.3](https://github.com/onelive-dev/OLX/compare/v1.5.0-cicd.2...v1.5.0-cicd.3) (2021-05-26)\n' +
    '\n' +
    '\n' +
    '### Bug Fixes\n' +
    '\n' +
    '* **cicd:** enable semantic-release debug + force release ([d262911](https://github.com/onelive-dev/OLX/commit/d26291168b6b82d16d56eed242c12ef60871e8ce))\n' +
    '\n' +
    '\n' +
    '\n',
  prerelease: true
}

Our .releaserc.yml file is as follows

branches:
  - master
# @todo enable automated release for all branches once some outstanding branches with non-compliant names are closed
#  - name: '**'
#    prerelease: true
  - name: cicd
    prerelease: true
plugins:
  - '@semantic-release/commit-analyzer'
  - '@semantic-release/release-notes-generator'
  - '@semantic-release/changelog'
  - - '@semantic-release/exec'
    # This hook is run only if a release is to be made
    # We create source-able file so future workflow steps can easily get to release metadata
    - prepareCmd: |
        RELEASE_VERSION="${nextRelease.version}"
        echo "Version to be released: $RELEASE_VERSION"
        cat > version.sh <<-EOF
          #!/bin/bash
          export RELEASE_VERSION="$RELEASE_VERSION"
          export RELEASE_CHANNEL="${nextRelease.channel}"
          export RELEASE_HEAD="${nextRelease.gitHead}"
          export RELEASE_NOTES="${nextRelease.notes}"
          export RELEASE_TAG="${nextRelease.gitTag}"
          export RELEASE_TYPE="${nextRelease.type}"
        EOF
  - - '@semantic-release/npm'
    - npmPublish: false
  - - '@semantic-release/git'
    - assets:
        - CHANGELOG.md
        - package.json
        - package-lock.json
  - - '@semantic-release/github'
    - assets:
        - path: '**'
          label: distribution files
      failComment: false
      successComment: false

Note I am able to make releases by making npm plugin generate a tarball and explicitly using that tarball in assets config. So a config like this works.

branches:
  - master
# @todo enable automated release for all branches once some outstanding branches with non-compliant names are closed
#  - name: '**'
#    prerelease: true
  - name: cicd
    prerelease: true
plugins:
  - '@semantic-release/commit-analyzer'
  - '@semantic-release/release-notes-generator'
  - '@semantic-release/changelog'
  - - '@semantic-release/exec'
    # This hook is run only if a release is to be made
    # We create source-able file so future workflow steps can easily get to release metadata
    - prepareCmd: |
        RELEASE_VERSION="${nextRelease.version}"
        echo "Version to be released: $RELEASE_VERSION"
        cat > version.sh <<-EOF
          #!/bin/bash
          export RELEASE_VERSION="$RELEASE_VERSION"
          export RELEASE_CHANNEL="${nextRelease.channel}"
          export RELEASE_HEAD="${nextRelease.gitHead}"
          export RELEASE_NOTES="${nextRelease.notes}"
          export RELEASE_TAG="${nextRelease.gitTag}"
          export RELEASE_TYPE="${nextRelease.type}"
        EOF
  - - '@semantic-release/npm'
    - npmPublish: false
      tarballDir: dist
  - - '@semantic-release/git'
    - assets:
        - CHANGELOG.md
        - package.json
        - package-lock.json
  - - '@semantic-release/github'
    - assets:
        - path: dist/*.tgz
          label: distribution files
Lenguaje dominante
JavaScript
Estrellas
535
Forks
150
Merge medio
5 d 16 h
PR fusionados (30 d)
11

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de semantic-release/github

Todos los issues de semantic-release/github

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.