cycjimmy / semantic-release-action

GitHub Action for Semantic Release
https://github.com/marketplace/actions/action-for-semantic-release
MIT License
514 stars 97 forks source link

ESM fail #204

Open RukshanJS opened 3 months ago

RukshanJS commented 3 months ago

In my yaml, a job as follows.

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v2

      - name: Use Node.js 20
        uses: actions/setup-node@v2
        with:
          node-version: '20'

      - name: Install dependencies
        run: npm install

      - name: Semantic Release
        if: github.ref == 'refs/heads/dev'
        uses: cycjimmy/semantic-release-action@v2
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          branch: dev
          extra_plugins: |
            @semantic-release/changelog
            @semantic-release/git

But this step fails during CI as follows

Error: Error [ERR_REQUIRE_ESM]: require() of ES Module /home/runner/work/_actions/cycjimmy/semantic-release-action/v2/node_modules/semantic-release/index.js from /home/runner/work/_actions/cycjimmy/semantic-release-action/v2/src/index.js not supported.
vvanouytsel commented 1 month ago

Hitting the same issue.

vvanouytsel commented 2 weeks ago

When using v4.1.0, I now get the following error:

 [5:19:18 PM] [semantic-release] › ✘  An error occurred while running semantic-release: RangeError: Invalid time value
    at committerDate (/home/runner/work/_actions/cycjimmy/semantic-release-action/v4.1.0/node_modules/conventional-changelog-writer/index.js:80:30)
    at /home/runner/work/_actions/cycjimmy/semantic-release-action/v4.1.0/node_modules/conventional-changelog-writer/lib/util.js:202:17
    at Array.forEach (<anonymous>)
    at processCommit (/home/runner/work/_actions/cycjimmy/semantic-release-action/v4.1.0/node_modules/conventional-changelog-writer/lib/util.js:198:31)
    at /home/runner/work/_actions/cycjimmy/semantic-release-action/v4.1.0/node_modules/conventional-changelog-writer/index.js:123:32 {
  pluginName: '@semantic-release/release-notes-generator'
}
Error: RangeError: Invalid time value
      - name: Check semantic release
        uses: cycjimmy/semantic-release-action@v4.1.0