JasonEtco / build-and-tag-action

📦🔖 A GitHub Action for publishing JavaScript Actions
MIT License
92 stars 38 forks source link

Add ability to include additional files #18

Open mheap opened 3 years ago

mheap commented 3 years ago

Include files other than main when creating a commit to update a tag. This will not be needed by most people, but is required if you're bundling ncc using ncc due to Error: ENOENT: no such file or directory, open '/home/runner/work/_actions/owner/repo/v1/dist/index.js.cache.js'

endorama commented 2 years ago

Just saw this and I would need the same functionality to include a license file with the releases.

@JasonEtco could you please consider this for merging?

jonasgeiler commented 2 years ago

I'd really like to have this feature! Instead of an input option, how about just including the files matched in the "files" entry in package.json?

Example:

{
  "name": "your-action-name",
  "main": "dist/index.js",
  "files": [
    "dist/licenses.txt"
  ],
  "scripts": {
    "build": "npx @vercel/ncc build && npx convert-action"
  }
}
hanseartic commented 1 year ago

@JasonEtco any chance you might want to integrate this or #24?

I would really like to include the README into the release tag (so that viewing older releases on the marketplace also shows the readme).

See for example an older version of this action itself: grafik

Zehir commented 1 year ago

Any updates over here ?

EddieWhi commented 1 year ago

I'd really like this too. Love the workflow of this action but need to include a wasm file along side the ncc generated index.js. @JasonEtco?

EddieWhi commented 1 year ago

@mheap turns out there's a bug in the PR (technically a bug exposed by this PR as it enables deployment of binaries). I forked into our org and used it to deploy a wasm with an action (as mentioned before) but discovered that the binary was corrupted by the roundtrip through utf-8. See https://github.com/primait/build-and-tag-action/commit/183ecd810e27f87e8265b87b40bafd45b977c6a4

mheap commented 11 months ago

@EddieWhi Excellent catch! I've cherry picked in to this PR in case it helps anyone else