semantic-release / semantic-release/github

Cannot include asset created during workflow

Open
#430 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
534
Forks
150
Avg merge
1m
Merged PRs (30d)
3

Description

Hello,

I'm using GitHub Actions to build and release my JS project on npm and GitHub.
During the process I'm generating a transpiled version for distribution.

I'm trying to include this distribution file in the assets for the GitHub release but I can't figure out how to get it working. Only the source code gets included in the release: https://github.com/voyanttools/voyantjs/releases/tag/v2.1.7

I know the distribution file exists because it's included in the tarball that's sent to npm.

Here's the semantic release configuration from my package.json file

"release": {
    "plugins": [
      "@semantic-release/commit-analyzer",
      "@semantic-release/release-notes-generator",
      "@semantic-release/changelog",
      "@semantic-release/npm",
      [
        "@semantic-release/git",
        {
          "assets": [
            "dist/voyantjs.js"
          ]
        }
      ],
      [
        "@semantic-release/github",
        {
          "assets": [
            {
              "path": "dist/voyantjs.js",
              "label": "JS distribution"
            }
          ]
        }
      ]
    ]
  }

I'm not sure if it's necessary to specify assets in both the git and github plugins. I'm using the git plugin simply to update the version in my package.json file.

I'd really appreciate any assistance in getting this working. Thanks in advance!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with package.json and its semantic-release configuration, then inspect the GitHub Actions workflow that invokes the release process. Compare the v2.1.7 release with the generated dist/voyantjs.js file and verify whether the distribution asset is present when the GitHub release is created.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, github, github-actions, javascript
Domain
ci-cd, release
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.