Skip to content

how to add .zip file as asset from a pull request that generates a new release tag #745

Open
@daniloab

Description

@daniloab

Hi, there.

I have a script that uses the git-js, which is an awesome lib, to generate a new pull request with a new tag for a release.

Today I can add files to this pull request and also generate a new tag release with it.

I want to know how can I add a .zip file as an asset to this release. This is how my code is working today:

    await git().checkout(['-B', branchName]);
    await git().add([
      'package.json',
      'CHANGELOG.md',
      myzipfile.zip,
      '-f',
    ]);
    await git().commit(`build(change-log): ${tag}`, [], '-n');
    await git().addAnnotatedTag(`${tag}`, `build(tag): ${tag}`);
    await git().push(['--follow-tags', '-u', 'origin', branchName]);

branchName: variable that explains itself
tag: tag of the new release

Inside this workflow, I generate a .zip file and I want to add it as an asset to this release tag.

How can I do it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions