Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

Publish step hanging with partial success - possible globbing issue

Aberta
#375 3 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
42/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Estagnada
Stack de tecnologia
github, javascript
Domínio
release

Direção de pesquisa

Comece em lib/publish.js nos pontos referenciados perto das linhas 34 e 56 e, em seguida, compare as duas configurações de assets em .releaserc.yml. Reproduza a etapa de publicação com o glob '**' e com dist/*.tgz e use a saída de debug para isolar a etapa do glob. Considera-se concluído quando o glob configurado não deixa mais a publicação travada e o release é concluído com os assets pretendidos.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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
Linguagem predominante
JavaScript
Estrelas
537
Forks
147
Merge médio
3h 16min
PRs com merge (30d)
12

Preparar o ambiente

Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de semantic-release/github

Todas as issues de semantic-release/github

Issues semelhantes

Mais issues de JavaScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.