GithubHelp home page GithubHelp logo

actions / typescript-action Goto Github PK

View Code? Open in Web Editor NEW
1.8K 37.0 424.0 3.88 MB

Create a TypeScript Action with tests, linting, workflow, publishing, and versioning

Home Page: https://github.com/actions

License: MIT License

TypeScript 76.29% Shell 23.71%
github-actions template typescript

typescript-action's Introduction

Create a GitHub Action Using TypeScript

GitHub Super-Linter CI Check dist/ CodeQL Coverage

Use this template to bootstrap the creation of a TypeScript action. ๐Ÿš€

This template includes compilation support, tests, a validation workflow, publishing, and versioning guidance.

If you are new, there's also a simpler introduction in the Hello world JavaScript action repository.

Create Your Own Action

To create your own action, you can use this repository as a template! Just follow the below instructions:

  1. Click the Use this template button at the top of the repository
  2. Select Create a new repository
  3. Select an owner and name for your new repository
  4. Click Create repository
  5. Clone your new repository

Important

Make sure to remove or update the CODEOWNERS file! For details on how to use this file, see About code owners.

Initial Setup

After you've cloned the repository to your local machine or codespace, you'll need to perform some initial setup steps before you can develop your action.

Note

You'll need to have a reasonably modern version of Node.js handy (20.x or later should work!). If you are using a version manager like nodenv or nvm, this template has a .node-version file at the root of the repository that will be used to automatically switch to the correct version when you cd into the repository. Additionally, this .node-version file is used by GitHub Actions in any actions/setup-node actions.

  1. ๐Ÿ› ๏ธ Install the dependencies

    npm install
  2. ๐Ÿ—๏ธ Package the TypeScript for distribution

    npm run bundle
  3. โœ… Run the tests

    $ npm test
    
    PASS  ./index.test.js
      โœ“ throws invalid number (3ms)
      โœ“ wait 500 ms (504ms)
      โœ“ test runs (95ms)
    
    ...

Update the Action Metadata

The action.yml file defines metadata about your action, such as input(s) and output(s). For details about this file, see Metadata syntax for GitHub Actions.

When you copy this repository, update action.yml with the name, description, inputs, and outputs for your action.

Update the Action Code

The src/ directory is the heart of your action! This contains the source code that will be run when your action is invoked. You can replace the contents of this directory with your own code.

There are a few things to keep in mind when writing your action code:

  • Most GitHub Actions toolkit and CI/CD operations are processed asynchronously. In main.ts, you will see that the action is run in an async function.

    import * as core from '@actions/core'
    //...
    
    async function run() {
      try {
        //...
      } catch (error) {
        core.setFailed(error.message)
      }
    }

    For more information about the GitHub Actions toolkit, see the documentation.

So, what are you waiting for? Go ahead and start customizing your action!

  1. Create a new branch

    git checkout -b releases/v1
  2. Replace the contents of src/ with your action code

  3. Add tests to __tests__/ for your source code

  4. Format, test, and build the action

    npm run all

    This step is important! It will run ncc to build the final JavaScript action code with all dependencies included. If you do not run this step, your action will not work correctly when it is used in a workflow. This step also includes the --license option for ncc, which will create a license file for all of the production node modules used in your project.

  5. Commit your changes

    git add .
    git commit -m "My first action is ready!"
  6. Push them to your repository

    git push -u origin releases/v1
  7. Create a pull request and get feedback on your action

  8. Merge the pull request into the main branch

Your action is now published! ๐Ÿš€

For information about versioning your action, see Versioning in the GitHub Actions toolkit.

Validate the Action

You can now validate the action by referencing it in a workflow file. For example, ci.yml demonstrates how to reference an action in the same repository.

steps:
  - name: Checkout
    id: checkout
    uses: actions/checkout@v4

  - name: Test Local Action
    id: test-action
    uses: ./
    with:
      milliseconds: 1000

  - name: Print Output
    id: output
    run: echo "${{ steps.test-action.outputs.time }}"

For example workflow runs, check out the Actions tab! ๐Ÿš€

Usage

After testing, you can create version tag(s) that developers can use to reference different stable versions of your action. For more information, see Versioning in the GitHub Actions toolkit.

To include the action in a workflow in another repository, you can use the uses syntax with the @ symbol to reference a specific branch, tag, or commit hash.

steps:
  - name: Checkout
    id: checkout
    uses: actions/checkout@v4

  - name: Test Local Action
    id: test-action
    uses: actions/typescript-action@v1 # Commit with the `v1` tag
    with:
      milliseconds: 1000

  - name: Print Output
    id: output
    run: echo "${{ steps.test-action.outputs.time }}"

Publishing a New Release

This project includes a helper script, script/release designed to streamline the process of tagging and pushing new releases for GitHub Actions.

GitHub Actions allows users to select a specific version of the action to use, based on release tags. This script simplifies this process by performing the following steps:

  1. Retrieving the latest release tag: The script starts by fetching the most recent release tag by looking at the local data available in your repository.
  2. Prompting for a new release tag: The user is then prompted to enter a new release tag. To assist with this, the script displays the latest release tag and provides a regular expression to validate the format of the new tag.
  3. Tagging the new release: Once a valid new tag is entered, the script tags the new release.
  4. Pushing the new tag to the remote: Finally, the script pushes the new tag to the remote repository. From here, you will need to create a new release in GitHub and users can easily reference the new tag in their workflows.

typescript-action's People

Contributors

baywet avatar bryanmacfarlane avatar dependabot[bot] avatar dsanders11 avatar foolip avatar grantbirki avatar hross avatar idiosapps avatar jj avatar kengotoda avatar maksimzhukov avatar maycxc avatar mdb avatar michaeldeboey avatar mscoutermarsh avatar mtfoley avatar namoscato avatar ncalteen avatar omarabid avatar paescuj avatar rentziass avatar rferro avatar rickstaa avatar sayakmukhopadhyay avatar shawnnapora avatar thboop avatar tingluohuang avatar vaporif avatar vtbassmatt avatar yamboy1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

typescript-action's Issues

Formatting script doesn't exist

Can't run npm run format from the README - given the set of packages I couldn't make the assumption on what you were planning, so opted for an issue.

.eslintrc.json is badly formatted

As per the title, the .eslintrc.json is wrongly indented for all lines except the first opening brace. This is a bit nitpicky but something that can be fixed nonetheless. I can quickly create a PR if accepted.

Simplify default build process

Hi, from what I understand your build process basically looks like this:

  • npm run build --> generates lib/index.js
  • npm run package --> runs ncc which takes lib/index.js and generates dist/index.js

I think this could be simplified by:

  • Remove npm run build action
  • Change "main" in package.json to src/index.ts (this is what ncc takes as input)

This would mean the build process could be reduced to:

  • npm run package --> runs ncc which now takes src/index.ts and generates dist/index.js

Or is there any particular reason you're using the "indirection" via tsc?
This may look like a small change to you, but note that this repository is copied everywhere so it would be nice to simplify it. And if that's not possible, it would be good to document why.

Thanks :)

npm test fails

Just following straight instructions I get this. This is an admittedly old node, 8.12

npm test

> [email protected] test /home/jmerelo/Code/js/typescript-action
> jest

 FAIL  __tests__/main.test.ts
  โ— Test suite failed to run

    Jest encountered an unexpected token

    This usually means that you are trying to import a file which Jest cannot parse, e.g. it's not plain JavaScript.

    By default, if Jest sees a Babel config, it will use that to transform your files, ignoring "node_modules".

    Here's what you can do:
     โ€ข To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config.
     โ€ข If you need a custom transformation specify a "transform" option in your config.
     โ€ข If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option.

    You'll find more details and examples of these config options in the docs:
    https://jestjs.io/docs/en/configuration.html

    Details:

    /home/jmerelo/Code/js/typescript-action/node_modules/jest-circus/node_modules/jest-matcher-utils/build/index.js:136
      } catch {
              ^

    SyntaxError: Unexpected token {

      at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:537:17)
      at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:579:25)

Test Suites: 1 failed, 1 total
Tests:       0 total
Snapshots:   0 total
Time:        0.039s
Ran all test suites.
npm ERR! Test failed.  See above for more details.

Latest version. 14, does not have a problem (it issues another series of warnings though)

Creating a branch produces lots of unwanted artifacts

And besides, does not clarify workflow, which implies copying thing from master to branches and update them while debugging.

The documentation should clarify that the files needed are:

  • action.yml
  • lib/main.js (or whatever file you're generating)
  • package*.json
  • Additionally, README.md and LICENSE, as well as a specific .gitignore.

Getting Cannot find module 'eslint-config-react-app' on npm run all

I've tried running it locally on my Mac and I get:

eslint src/**/*.ts

Error: Cannot find module 'eslint-config-react-app'
Referenced from: /Users/gabrielkohen/Documents/git/package.json
at ModuleResolver.resolve (/Users/gabrielkohen/Documents/git/experiments/typescript-action/node_modules/eslint/lib/util/module-resolver.js:72:19)
at resolve (/Users/gabrielkohen/Documents/git/experiments/typescript-action/node_modules/eslint/lib/config/config-file.js:507:28)
at load (/Users/gabrielkohen/Documents/git/experiments/typescript-action/node_modules/eslint/lib/config/config-file.js:579:26)
at /Users/gabrielkohen/Documents/git/experiments/typescript-action/node_modules/eslint/lib/config/config-file.js:453:36
at Array.reduceRight ()
at applyExtends (/Users/gabrielkohen/Documents/git/experiments/typescript-action/node_modules/eslint/lib/config/config-file.js:431:26)
at loadFromDisk (/Users/gabrielkohen/Documents/git/experiments/typescript-action/node_modules/eslint/lib/config/config-file.js:551:22)
at Object.load (/Users/gabrielkohen/Documents/git/experiments/typescript-action/node_modules/eslint/lib/config/config-file.js:587:20)
at Config.getLocalConfigHierarchy (/Users/gabrielkohen/Documents/git/experiments/typescript-action/node_modules/eslint/lib/config.js:240:44)
at Config.getConfigHierarchy (/Users/gabrielkohen/Documents/git/experiments/typescript-action/node_modules/eslint/lib/config.js:192:43)
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] lint: eslint src/**/*.ts
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] lint script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/gabrielkohen/.npm/_logs/2020-01-26T17_21_29_686Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] all: npm run build && npm run format && npm run lint && npm run pack && npm test
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] all script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:

I made sure I had nothing funny install globally:
:jda-sample-action gabrielkohen$ npm list -g --depth 0
/usr/local/lib
โ”œโ”€โ”€ [email protected]
โ”œโ”€โ”€ [email protected]
โ”œโ”€โ”€ [email protected]
โ””โ”€โ”€ [email protected]

Ideas?

Thanks.

actions.yml are required in master and branch

However, there does not seem to be a big problem if they are different. I have changed action.yml in master and not updated it in releases/v1, and there didn't seem to be any major problem. Could it be that the metadata in one and the other can be different? Or maybe that it's just not needed in master and is there just for the show?

Add typing + validation workflow

I'm the author of https://github.com/krzema12/github-actions-typing/ which aims at bringing more type-safety in the world of GitHub Actions' APIs. There's already one library that makes active use of it: https://github.com/krzema12/github-actions-kotlin-dsl.

To increase adoption of this approach, I propose considering including support for it in this template repository, that is:

  • adding an action-types.yml file
  • adding a workflow that would use an action in the mentioned repository to validate the file mentioned above

Example of how it was integrated with an existing action: ReactiveCircus/android-emulator-runner@a410b40

If you're open to introducing it, I'll be happy to create a PR. If you have any feedback that would need to be addressed prior to introducing it to the wider audience, I'll be happy to address it.

Document the intended usage workflow

Hi! I didn't know about the "template" feature on GitHub and it took me some time (and help from a friend) to figure out the "correct" way to use this repository. Initially, I had cloned from the Git CLI and hand-tweaked the files, but I later found out that there is the "Use this template" button I am supposed to use instead.

Maybe this is on the a different team to make that UI a little more discoverable in general, but it probably wouldn't hurt to mention this in the first sentence of the readme, either explicitly ('Click the "Use this template" button above to get started.') or turn the word "template" into a link to the appropriate GitHub documentation (not sure where that page is though).

Build automation in Dependabot / fork contexts

I've had some success auto-building / committing the compiled ncc package in PR contexts (i.e. via git-auto-commit-action) but am running into challenges with Dependabot updates now that those workflows run with read-only permissions.

I realize this issue is only tangentially related to this template (given it uses ncc), but do you have any process recommendations to ensure the committed package is kept up to date in these contexts?

I've read this blog several times but haven't had much success with the recommendations โ€“ some of which seem complicated.

Keep dependencies up to date

Hi, I instantiated this template to create an action, and immediately got PRs from dependabot to bump outdated actions.
It would probably be good to keep this template up to date so that one does not get these alerts downstream already at the time of forking...

At the time of writing, there is half a dozen dependabot PRs open, with the oldest from April 2022:

Add webpack config example

The README suggests a not easy process to update release branches which keeps unnecessary files. Using packagers, such as webpack, allows to distribute actions as a single js file. The following example has been successfully tested with actions based on this template:

const join = require('path').join;

module.exports = {
  entry: './src/main.ts',
  target: 'node',
  output: {
    path: join(__dirname, 'dist'),
    filename: 'main.js',
  },
  devtool: 'source-map',
  resolve: { extensions: ['.ts', '.js'] },
  module: {
    rules: [{
      test: /\.ts$/,
      exclude: /node_modules/,
      use: [{
        loader: 'ts-loader',
      }]
    }]
  },
};

See, for example:

It'd be good if:

  • Instructions about how to use one or multiple packagers are added to the README or some other md file.
  • The default/suggested procedure was to use a packager.

eslint-plugin-prettier missing from devDependencies?

When running the all script after cloning, the eslint step failed with the following error:


Oops! Something went wrong! :(

ESLint: 5.16.0.
ESLint couldn't find the plugin "eslint-plugin-prettier". This can happen for a couple different reasons:

1. If ESLint is installed globally, then make sure eslint-plugin-prettier is also installed globally. A globally-installed ESLint cannot find a locally-installed plugin.

2. If ESLint is installed locally, then it's likely that the plugin isn't installed correctly. Try reinstalling by running the following:

    npm i eslint-plugin-prettier@latest --save-dev

Path to ESLint package: .../node_modules/eslint

If you still can't figure out the problem, please stop by https://gitter.im/eslint/eslint to chat with the team.

Didn't dig into what was causing the plugin to be needed, but adding eslint-plugin-prettier to devDependencies fixes the issue.

This Template seems to be code rotting ๐Ÿ˜ข

Hey GitHub Actions Team,

This seems to be code-rotting. There are quite a few open PRs, especially from Dependabot, that have never been merged.

Of particular importance, the CodeQL action is not running the latest version. Additionally, running npm install from the repository flags one high severity vulnerability in minimatch (a vulnerability from 6 months ago) (GHSA-f8q6-p94x-37v3). Not a great look for a project that is supposed to be the base for all newly developed GitHub actions. Additionally, the latest NPM LTS is reported to not be supported (#646).

Template not compatible with latest Node.js LTS version (18.14.2)

With the latest Node version 18.14.2 LTS:

$ npm run build && npm run package

> [email protected] build
> tsc


> [email protected] package
> ncc build --source-map --license licenses.txt

ncc: Version 0.31.1
ncc: Compiling file index.js into CJS
Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:71:19)
    at Object.createHash (node:crypto:133:10)
    at hashOf (/home/fowl/dev/sand/test-ts-action/node_modules/@vercel/ncc/dist/ncc/index.js.cache.js:37:1855992)
    at ncc (/home/fowl/dev/sand/test-ts-action/node_modules/@vercel/ncc/dist/ncc/index.js.cache.js:37:1860457)
    at runCmd (/home/fowl/dev/sand/test-ts-action/node_modules/@vercel/ncc/dist/ncc/cli.js.cache.js:1:55128)
    at 819 (/home/fowl/dev/sand/test-ts-action/node_modules/@vercel/ncc/dist/ncc/cli.js.cache.js:1:51698)
    at __webpack_require__ (/home/fowl/dev/sand/test-ts-action/node_modules/@vercel/ncc/dist/ncc/cli.js.cache.js:1:59048)
    at /home/fowl/dev/sand/test-ts-action/node_modules/@vercel/ncc/dist/ncc/cli.js.cache.js:1:59260
    at /home/fowl/dev/sand/test-ts-action/node_modules/@vercel/ncc/dist/ncc/cli.js.cache.js:1:59321
    at Object.<anonymous> (/home/fowl/dev/sand/test-ts-action/node_modules/@vercel/ncc/dist/ncc/cli.js:8:28) {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

With the older Node.js LTS version 16.13.0, npm run package works as expected.

Enable ESLint for tests

I'm trying to enable ESLint for tests too.

But after fixing the basic errors I cannot fix this one:

$ yarn eslint -c .eslintrc.json __tests__/**/*.test.ts
yarn run v1.22.17
$ /home/josecelano/Documents/github/josecelano/typescript-action/node_modules/.bin/eslint -c .eslintrc.json '__tests__/**/*.test.ts'

/home/josecelano/Documents/github/josecelano/typescript-action/__tests__/main.test.ts
  1:1  error  Filename 'main.test.ts' does not match the naming convention  filenames/match-regex

โœ– 1 problem (1 error, 0 warnings)

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Here you can see the changes I've made to the templates to support ESLint for the tests.

Turn on Dependabot security updates

When recently using this template there were several security issues that needed to be updated. I was wondering if we could turn on auto-security PRs for this repo so users don't create a new repo from the template and need to immediately update the dependent versions.

Thanks!

Code Scanning reporting finding on repos created using template

If you create a repo using the template and enable Code Scanning in security using the default settings a High severity issue is found in dist/sourcemap-register.js. The issue remains there after customizing the action and re-packaging it as well.

Although the code in dist is generated, it is nevertheless the actual code executed and as such should pass code scanning. I have not spent time on figuring out if the issue come from one of the @actions libraries or from one of the dependencies.

Test repo: https://ghe.telenordigital.com/Infrastructure-Sandbox/test-actions-codescan/security/code-scanning

Thanks,

-- Paul

Editing PR first comment or title does not trigger a workflow

I'm trying to write an action based on this template that will check/watch the first comment of PRs. Each time the comment is edited/updated, the workflow should be executed. I tried with the following workflow:

name: 'Self-labelling'
on: [pull_request, issues, issue_comment]
jobs:
  build:
    strategy:
      fail-fast: false
    runs-on: ubuntu-latest
    steps:
    - uses: 1138-4EB/actions@tip

I found that it is executed when I open a PR, respond to a PR (new comment), open an issue, respond to an issue, edit the body of the first comment of an issue, etc. However, it does not work neither when editing the first comment of a PR nor when editing the title of a PR. Therefore, it seems that the only option to trigger the workflow after the PR is created is to synchronize it again. I would expect that any of these actions would trigger pull_request edited, issue_comment edited or issues edited.

/cc @damccorm

Dependabot PR Checks Fail for typescript v4.4.x

I generated a repo by clicking "Use This Template", and when dependabot ran for the first time, one of the first PRs had failing tests. It appears that using v4.4.x of typescript gives compilation errors in src/main.ts.
image

Offending line appears to be here:

core.setFailed(error.message)

I think it has to do with the use of unknown type for errors in Typescript v4.4. I had been referring to this announcement from Aug 2021:
https://devblogs.microsoft.com/typescript/announcing-typescript-4-4/#use-unknown-catch-variables

Rename default branch

๐Ÿ‘‹ This issue is to track the move over to using main as the default branch for this repo. Weโ€™d love your team's help in completing this transition.

Do not remove your old default branch, customers are going to be using it. We will be sending messages out about these changes, but if you want to message in your repository, that's fine as well.

  • Create a main branch.
  • You might need to rebase any pull requests you want to merge before changing the default branch.
  • Change the default branch in settings to main.
  • Update any documentation in this repo to refer to the new branch name, although using the version tag is still preferred.
  • Check that this Action works correctly for users who have a repository with a custom default branch name.
  • Close this issue and celebrate ๐ŸŽ‰

We are aiming to complete this work by July 17th August 28th.

delete me

I accidentally submitted an issue to the wrong repo, apologies for the noise ๐Ÿ™

types for the payload?

I'm trying to cast the payload to the correct type, but I haven't been able to find the typings -- looks like they ought to come from @octokit/webhooks, but I've had no luck. Trying to do something like

const payload = github.context.payload as Webhooks.WebhooksEvents.WebhookPayloadIssues

but that gets me a compilation error.

npm install fails - zlib: incorrect data check

The documentation specifies "a reasonably modern version of node" is required to work with this template. The toolkit documentation suggests Nodejs v12 is installed on GitHub runners (though I'm confused regarding the matrix example).

What is the minimum required version of Nodejs for this template to work?
What is the minimum AND maximum required versions of NPM for use with the existing lock file?

The following is what I experienced when running npm install on a fresh install of Nodejs v12.22.12 and NPM v6.14.16:

> npm install (click for log)
npm WARN tar zlib: incorrect data check
npm WARN tarball cached data for [email protected] (sha512-vBZcPRUR5MZJwoyi3ZoyQlc1rXeEck8KgeC9AwwOn+exuxLxq5toTRDTSaVrXHxelDMHy9zlicw8u66yxoSUFg==) seems to be corrupted. Refreshing cache.
npm WARN tar zlib: incorrect data check
npm WARN tarball cached data for typescript@^4.4.4 (sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg==) seems to be corrupted. Refreshing cache.
npm WARN tar zlib: incorrect data check
npm WARN tarball tarball data for typescript@^4.4.4 (sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg==) seems to be corrupted. Trying one more time.
npm WARN tar zlib: incorrect data check
npm WARN tarball tarball data for typescript@^4.4.4 (sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg==) seems to be corrupted. Trying one more time.
npm WARN tar ENOENT: no such file or directory, open '/Users/ken/repos/auto-merge-action/node_modules/.staging/prettier-f5bca37b/esm/parser-graphql.mjs'
npm WARN tar ENOENT: no such file or directory, open '/Users/ken/repos/auto-merge-action/node_modules/.staging/prettier-f5bca37b/esm/parser-html.mjs'
npm WARN tar ENOENT: no such file or directory, open '/Users/ken/repos/auto-merge-action/node_modules/.staging/prettier-f5bca37b/esm/parser-markdown.mjs'
npm WARN tar ENOENT: no such file or directory, open '/Users/ken/repos/auto-merge-action/node_modules/.staging/prettier-f5bca37b/esm/parser-meriyah.mjs'
npm WARN tar ENOENT: no such file or directory, open '/Users/ken/repos/auto-merge-action/node_modules/.staging/prettier-f5bca37b/esm/parser-postcss.mjs'
npm WARN tar ENOENT: no such file or directory, open '/Users/ken/repos/auto-merge-action/node_modules/.staging/prettier-f5bca37b/esm/parser-typescript.mjs'
npm WARN tar ENOENT: no such file or directory, open '/Users/ken/repos/auto-merge-action/node_modules/.staging/prettier-f5bca37b/esm/parser-yaml.mjs'
npm WARN tar ENOENT: no such file or directory, open '/Users/ken/repos/auto-merge-action/node_modules/.staging/prettier-f5bca37b/esm/standalone.mjs'
npm WARN tar zlib: incorrect data check
npm WARN tarball tarball data for [email protected] (sha512-vBZcPRUR5MZJwoyi3ZoyQlc1rXeEck8KgeC9AwwOn+exuxLxq5toTRDTSaVrXHxelDMHy9zlicw8u66yxoSUFg==) seems to be corrupted. Trying one more time.
npm WARN [email protected] requires a peer of eslint@^8.0.1 but none is installed. You must install peer dependencies yourself.

npm ERR! code Z_DATA_ERROR
npm ERR! errno -3
npm ERR! zlib: incorrect data check

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/ken/.npm/_logs/2022-05-14T02_32_49_024Z-debug.log

To get around this I ran npm ci which ran successfully but with warnings:

> npm ci (click for log)
npm WARN prepare removing existing node_modules/ before installation
npm WARN tar zlib: incorrect data check
npm WARN tarball cached data for [email protected] (sha512-vBZcPRUR5MZJwoyi3ZoyQlc1rXeEck8KgeC9AwwOn+exuxLxq5toTRDTSaVrXHxelDMHy9zlicw8u66yxoSUFg==) seems to be corrupted. Refreshing cache.
npm WARN tar zlib: incorrect data check
npm WARN tarball tarball data for [email protected] (sha512-vBZcPRUR5MZJwoyi3ZoyQlc1rXeEck8KgeC9AwwOn+exuxLxq5toTRDTSaVrXHxelDMHy9zlicw8u66yxoSUFg==) seems to be corrupted. Trying one more time.
added 842 packages in 5.724s

Installing NPM v8.10.0 yielded the same results (also warning of old lockfile) erroring with zlib incorrect data check:

> npm install (click for log)
npm WARN old lockfile 
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile 
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile 
npm WARN tar zlib: incorrect data check
npm WARN tarball cached data for typescript@https://registry.npmjs.org/typescript/-/typescript-4.4.4.tgz (sha512-DqGhF5IKoBl8WNf8C1gu8q0xZSInh9j1kJJMqT3a94w1JzVaBU4EXOSMrz9yDqMT0xt3selp83fuFMQ0uzv6qA==) seems to be corrupted. Refreshing cache.
npm WARN tar zlib: incorrect data check
npm WARN tarball cached data for acorn@https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz (sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==) seems to be corrupted. Refreshing cache.
npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN tarball tarball data for typescript@https://registry.npmjs.org/typescript/-/typescript-4.4.4.tgz (sha512-DqGhF5IKoBl8WNf8C1gu8q0xZSInh9j1kJJMqT3a94w1JzVaBU4EXOSMrz9yDqMT0xt3selp83fuFMQ0uzv6qA==) seems to be corrupted. Trying again.
npm WARN tarball tarball data for acorn@https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz (sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==) seems to be corrupted. Trying again.
npm WARN tar zlib: incorrect data check
npm WARN tarball tarball data for typescript@https://registry.npmjs.org/typescript/-/typescript-4.4.4.tgz (sha512-DqGhF5IKoBl8WNf8C1gu8q0xZSInh9j1kJJMqT3a94w1JzVaBU4EXOSMrz9yDqMT0xt3selp83fuFMQ0uzv6qA==) seems to be corrupted. Trying again.
npm ERR! code Z_DATA_ERROR
npm ERR! errno -3
npm ERR! zlib: incorrect data check

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/ken/.npm/_logs/2022-05-14T04_06_50_711Z-debug-0.log

NPM v8.10.0 also errored on npm ci validating zlib:

> npm ci (click for log)
npm WARN old lockfile 
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile 
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile 
npm WARN tar zlib: incorrect data check
npm WARN tarball cached data for typescript@https://registry.npmjs.org/typescript/-/typescript-4.4.4.tgz (sha512-DqGhF5IKoBl8WNf8C1gu8q0xZSInh9j1kJJMqT3a94w1JzVaBU4EXOSMrz9yDqMT0xt3selp83fuFMQ0uzv6qA==) seems to be corrupted. Refreshing cache.
npm WARN tar zlib: incorrect data check
npm WARN tarball cached data for acorn@https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz (sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==) seems to be corrupted. Refreshing cache.
npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN tarball tarball data for typescript@https://registry.npmjs.org/typescript/-/typescript-4.4.4.tgz (sha512-DqGhF5IKoBl8WNf8C1gu8q0xZSInh9j1kJJMqT3a94w1JzVaBU4EXOSMrz9yDqMT0xt3selp83fuFMQ0uzv6qA==) seems to be corrupted. Trying again.
npm WARN tarball tarball data for acorn@https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz (sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==) seems to be corrupted. Trying again.
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID parsed number outside of javascript safe integer range
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID parsed number outside of javascript safe integer range
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID parsed number outside of javascript safe integer range
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID parsed number outside of javascript safe integer range
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID parsed number outside of javascript safe integer range
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID parsed number outside of javascript safe integer range
npm WARN tar TAR_ENTRY_INVALID parsed number outside of javascript safe integer range
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID parsed number outside of javascript safe integer range
npm WARN tar TAR_ENTRY_INVALID parsed number outside of javascript safe integer range
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID parsed number outside of javascript safe integer range
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID parsed number outside of javascript safe integer range
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID parsed number outside of javascript safe integer range
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID parsed number outside of javascript safe integer range
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID parsed number outside of javascript safe integer range
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID parsed number outside of javascript safe integer range
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID parsed number outside of javascript safe integer range
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID parsed number outside of javascript safe integer range
npm WARN tar TAR_ENTRY_INVALID parsed number outside of javascript safe integer range
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID parsed number outside of javascript safe integer range
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID parsed number outside of javascript safe integer range
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID parsed number outside of javascript safe integer range
npm WARN tar TAR_ENTRY_INVALID parsed number outside of javascript safe integer range
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID parsed number outside of javascript safe integer range
npm WARN tar TAR_ENTRY_INVALID parsed number outside of javascript safe integer range
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID parsed number outside of javascript safe integer range
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID parsed number outside of javascript safe integer range
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID parsed number outside of javascript safe integer range
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID parsed number outside of javascript safe integer range
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID parsed number outside of javascript safe integer range
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID parsed number outside of javascript safe integer range
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID parsed number outside of javascript safe integer range
npm WARN tar TAR_ENTRY_INVALID parsed number outside of javascript safe integer range
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID parsed number outside of javascript safe integer range
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID parsed number outside of javascript safe integer range
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID parsed number outside of javascript safe integer range
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID parsed number outside of javascript safe integer range
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID parsed number outside of javascript safe integer range
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID parsed number outside of javascript safe integer range
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID parsed number outside of javascript safe integer range
npm WARN tar TAR_ENTRY_INVALID parsed number outside of javascript safe integer range
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_ENTRY_INVALID parsed number outside of javascript safe integer range
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar zlib: incorrect data check
npm WARN tarball tarball data for typescript@https://registry.npmjs.org/typescript/-/typescript-4.4.4.tgz (sha512-DqGhF5IKoBl8WNf8C1gu8q0xZSInh9j1kJJMqT3a94w1JzVaBU4EXOSMrz9yDqMT0xt3selp83fuFMQ0uzv6qA==) seems to be corrupted. Trying again.
npm ERR! code Z_DATA_ERROR
npm ERR! errno -3
npm ERR! zlib: incorrect data check

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/ken/.npm/_logs/2022-05-14T04_08_28_586Z-debug-0.log

With Nodejs v12.22.12 and NPM v6.14.16 I was able to successfully run build, package, and test scripts after running npm ci to install dependencies.

Publish to a distribution branch

This is a question because I do not understand part of the README.

In the README these are the steps describing how to publish a new release.

$ npm run package
$ git add dist
$ git commit -a -m "prod dependencies"
$ git push origin releases/v1

The GitHub documentation is a little bit confusing for me. It is supposed you can release new versions using tags or branches. I suppose in this template you have chosen a concrete strategy. I would like you to confirm if I'm right about your proposed release management process and also be more explicit about that in the README.

This is how I understand your proposal to manage releases:

  • You do not include the built app in every commit. I mean the dist folder. This way you encourage people to use only published versions.
  • You are using branches instead of tags. I mean, releases/v1 is a branch.
  • releases/v1 is a beta branch. At some point when you consider it stable, you create the tag 1.0.0 on the main branch.
  • I suppose the check-dist.yml should fail always except when you build a new app version.

I'm using this template and we have been discussing this topic. The link you have added does not make things much clearer to me.

"Publish to a distribution branch" instructions need to be updated

As of #42, it looks like you use ncc to release version of your action. I think the following should be done:

  • dist should be added to .gitignore, to prevent usage of actions from the master branch. See https://aka.ms/nomasters and actions/starter-workflows#240

  • Everything about node_modules should be removed from the "Publish to a distribution branch" instructions in README.md. It's not necessary to commit node_modules any more.

  • The "Publish to a distribution branch" instructions should tell you to run npm run pack and to comment out dist from .gitignore. Better yet, git add -f dist/index.js could be used in the distribution branch. Maybe git add --force dist/index.js could be added as another npm script.

Improve Onboarding Experience

First thank you for this template, this looks like a good way to quickly bootstrap into GitHub Actions.

However, I feel the on boarding experience could be improved. After cloning this repository you get at least 8 issues immediately opened up by Dependabot.

While it is super helpful to have automated dependency checking (especially in a dependency tree as deep as this), this feels like a negative user experience. I would agree with maybe having one or two (at most) out of date dependencies to give users a feel for how this process should work, but flooding a new clone is a bit steep.

Furthermore as far as I can see this process is not documented anywhere in the README. While it should be expected that if you're writing an action you know what you're doing, but it can be a jolt even when you realize what is occurring.

Improve experience of checking in node_modules

Right now, we use husky but its kinda painful. In particular, for users who use editors like VSCode, not having node_modules in the gitignore causes some problems.

We've thought about the idea of having master (or another branch) basically be a dev branch, with no node_modules checked in and then creating an action to automatically create release branches. Definitely open to suggestions here as well.

releases/v1

Thank you ๐Ÿ™‡โ€โ™€ for wanting to create an issue in this repository. Before you do, please ensure you are filing the issue in the right place. Issues should only be opened on if the issue relates to code in this repository.

If your issue is relevant to this repository, please delete this text and continue to create this issue. Thank you in advance.

Warning: `pre` execution is not supported for local action from './'

I am one of the contributors for Azure/sql-action, and we have a workflow defined here that uses ./ to run our action and test some functionalities. I followed this guide to add a pre script for some setup code, like this:

runs:
  using: 'node12'
  pre: 'lib/setup.js'
  main: 'lib/main.js'

But in our workflow, it seems like that is ignored

Warning: pre execution is not supported for local action from './'

Is there a way to execute the pre script even for using ./?

A workaround would be to move the pre script into our main function, but we'd like to keep the setup code separate if possible.

action.yml runs main dist/index.js but dist isn't generated by scripts

Just been using this as an example to set up a new action and I noticed that action.yml contains the following:

runs:
  using: 'node12'
  main: 'dist/index.js'

but it doesn't seem that dist is generated by any of the scripts and other files (such as the run test) reference the generated lib folder as the runner

Since there isn't a mention of the dist folders purpose in the readme, am I misunderstanding how this is utilized or is this an oversight? ๐Ÿค”

Husky hooks?

The contributers file mentions Husky hooks but they are not defined in package.json.

Can they be added to the repo?

Detected uncommitted changes after build.

When dependabot bumps the version of dependencies, I routinely get this failure:

Detected uncommitted changes after build.  See status below:
[18](https://github.com/kenhowardpdx/auto-merge-action/runs/6497746695?check_suite_focus=true#step:6:19)
diff --git a/dist/index.js.map b/dist/index.js.map
[19](https://github.com/kenhowardpdx/auto-merge-action/runs/6497746695?check_suite_focus=true#step:6:20)
index f236678..ef8f2d5 100644
[20](https://github.com/kenhowardpdx/auto-merge-action/runs/6497746695?check_suite_focus=true#step:6:21)
Binary files a/dist/index.js.map and b/dist/index.js.map differ

The map file is not necessary for the operation of the action. It would be better if it wasn't included in the package process.

Prettier parser choice (TypeScript) makes it harder and confusing to format YAML files

Steps to reproduce

  • Clone this repo
  • Run inside it npm i
  • Open the repo with VS Code, in which:
  • note: the same could be done with IntelliJ IDEs
  • Edit action.yml, save the file

Expected

The file is formatted as a YAML file by Prettier.

Actual behavior

The file is formatted as a TypeScript file by Prettier, messing up its formatting:

name: 'Your name here'
description: 'Provide a description here'
author: 'Your name or organization here'
runs: using: 'node12' # messed up formatting
main: 'dist/index.js'

Fix

Prettier is perfectly capable of selecting the needed parser on its own.
From Prettier config documentation:

Never put the parser option at the top level of your configuration. Only use it inside overrides. Otherwise you effectively disable Prettier's automatic file extension based parser inference. This forces Prettier to use the parser you specified for all types of files โ€“ even when it doesn't make sense, such as trying to parse a CSS file as JavaScript.

As such the recommended fix would be to remove the Prettier parser configuration.
When removed, Prettier will select the TypeScript parser to format the TypeScript files of this repo.

I've opened a PR to do just that ๐Ÿ˜€ : #48

Lock "@types/node" to the version that runner uses

I had an issue of os.version being undefined then I realized that it was introduced in Node.js 12.17 and GitHub runner is using an earlier version of Node.js to run action. I beleive this would solve the issue of accidentally using types that are not available during run.

This should preferably be done in a way, that stuff like yarn upgrade --latest don't update this to the latest one.

Large package-lock.json

Please correct me if I am wrong:
Whenever an action runs for the first time in a specific workflow, the action-runner fetches an entire shallow-commit on the fly.

This raises the question about repo-size.
Currently, package-lock.json is 346 KB.
This would not be a big deal, but the action-runner might download it all the time.
Are there any suggestions on how to reduce this overhead?

Using GitHub with GITHUB_TOKEN without Prefix leaks token

import * as core from '@actions/core';
import { context, GitHub } from '@actions/github'

//comes from {{secrets.GITHUB_TOKEN}}
const repoToken = core.getInput('repo-token', { required: true })
const client = new GitHub(repoToken)

will leak the token on error:

"Could not resolve to a node with the global id of 'M....c='."

19-11-22T16:44:34.9046342Z (node:2404) UnhandledPromiseRejectionWarning: HttpError: Validation Failed: "Could not resolve to a node with the global id of 'M....c='."
2019-11-22T16:44:34.9047036Z     at /home/runner/work/_actions/rowi1de/typescript-action/master/node_modules/@octokit/request/dist-node/index.js:66:23
2019-11-22T16:44:34.9047273Z     at processTicksAndRejections (internal/process/task_queues.js:89:5)
201

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.