Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Not supported #92

Closed
jorgebodega opened this issue Feb 11, 2022 · 8 comments
Closed

Error: Not supported #92

jorgebodega opened this issue Feb 11, 2022 · 8 comments

Comments

@jorgebodega
Copy link

Describe the bug
While running semantic release on an action, I'm getting an error Error: Not supported after detecting what version should be created.

image

https://github.com/jorgebodega/typeorm-seeding/runs/5140238361?check_suite_focus=true#step:7:84

Workflow

name: Release
on:
  workflow_dispatch:
    inputs:
      dry-run:
        required: false
        default: false
jobs:
  release:
    name: Generate a new release
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v2
        with:
          node-version: lts/gallium
      - id: modules-cache
        uses: actions/cache@v2.1.7
        with:
          path: '**/node_modules'
          key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
      - run: yarn install --frozen-lockfile
        if: steps.modules-cache.outputs.cache-hit != 'true'
      - name: Build package
        run: yarn build
      - uses: cycjimmy/semantic-release-action@v2
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
        with:
          semantic_version: 19
          dry_run: ${{ github.event.inputs.dry-run }}

https://github.com/jorgebodega/typeorm-seeding/blob/next/.github/workflows/release.yml

Expected behavior
While running on local environment, with dry run flag, it does not fail.

image

Additional context

Workflow is using last version of semantic-release due to Renovate Bot. If this action does not support that, please tell me.

@ExodusOTH
Copy link

I can second this. Error only occurs when using the dry_run flag

@gvart-sellics
Copy link

same for me, fails on dry_run

@maxiride
Copy link

Failing also not on dry_run, can't share links due to a private repo. Below the logs and the workflow. The same workflow worked just fine couple of days ago.

Run cycjimmy/semantic-release-action@v[2](https://github.com/indisrl/af/runs/5202811835?check_suite_focus=true#step:4:2)
  with:
  env:
    GITHUB_TOKEN: ***

added 4 packages, and audited 5 packages in 680ms

found 0 vulnerabilities


[[3](https://github.com/indisrl/af/runs/5202811835?check_suite_focus=true#step:4:3):[4](https://github.com/indisrl/af/runs/5202811835?check_suite_focus=true#step:4:4)3:32 PM] [semantic-release] › ℹ  Running semantic-release version 19.0.2
[3:43:32 PM] [semantic-release] › ✔  Loaded plugin "verifyConditions" from "@semantic-release/github"
[3:43:32 PM] [semantic-release] › ✔  Loaded plugin "analyzeCommits" from "@semantic-release/commit-analyzer"
[3:43:32 PM] [semantic-release] › ✔  Loaded plugin "generateNotes" from "@semantic-release/release-notes-generator"
[3:43:32 PM] [semantic-release] › ✔  Loaded plugin "publish" from "@semantic-release/github"
[3:43:32 PM] [semantic-release] › ✔  Loaded plugin "addChannel" from "@semantic-release/github"
[3:43:32 PM] [semantic-release] › ✔  Loaded plugin "success" from "@semantic-release/github"
[3:43:32 PM] [semantic-release] › ✔  Loaded plugin "fail" from "@semantic-release/github"
[3:43:34 PM] [semantic-release] › ℹ  Start step "fail" of plugin "@semantic-release/github"
[3:43:34 PM] [semantic-release] [@semantic-release/github] › ℹ  Verify GitHub authentication (https://api.github.com)
[3:43:34 PM] [semantic-release] › ✖  Failed step "fail" of plugin "@semantic-release/github"
[3:43:34 PM] [semantic-release] › ✖  An error occurred while running semantic-release: TypeError: Cannot read property 'name' of undefined
    at module.exports (/home/runner/work/_actions/cycjimmy/semantic-release-action/v2/node_modules/@semantic-release/github/lib/get-fail-comment.js:19:10)
    at module.exports (/home/runner/work/_actions/cycjimmy/semantic-release-action/v2/node_modules/@semantic-release/github/lib/fail.js:28:[7](https://github.com/indisrl/af/runs/5202811835?check_suite_focus=true#step:4:7)4)
    at async fail (/home/runner/work/_actions/cycjimmy/semantic-release-action/v2/node_modules/@semantic-release/github/index.js:64:3)
    at async validator (/home/runner/work/_actions/cycjimmy/semantic-release-action/v2/node_modules/semantic-release/lib/plugins/normalize.js:34:24)
    at async /home/runner/work/_actions/cycjimmy/semantic-release-action/v2/node_modules/semantic-release/lib/plugins/pipeline.js:37:34
    at async /home/runner/work/_actions/cycjimmy/semantic-release-action/v2/node_modules/semantic-release/lib/plugins/pipeline.js:31:3
    at async Object.pluginsConf.<computed> [as fail] (/home/runner/work/_actions/cycjimmy/semantic-release-action/v2/node_modules/semantic-release/lib/plugins/index.js:[8](https://github.com/indisrl/af/runs/5202811835?check_suite_focus=true#step:4:8)0:11)
Error: Error: Not supported
    at async callFail (/home/runner/work/_actions/cycjimmy/semantic-release-action/v2/node_modules/semantic-release/index.js:243:7)
    at async module.exports (/home/runner/work/_actions/cycjimmy/semantic-release-action/v2/node_modules/semantic-release/index.js:272:7)
    at async release (/home/runner/work/_actions/cycjimmy/semantic-release-action/v2/src/index.js:28:[18](https://github.com/indisrl/af/runs/5202811835?check_suite_focus=true#step:4:18)) {
  pluginName: '@semantic-release/github'
}
[3:43:[34](https://github.com/indisrl/af/runs/5202811835?check_suite_focus=true#step:4:34) PM] [semantic-release] › ✖  ERELEASEBRANCHES The release branches are invalid in the `branches` configuration.

Workflow:

on:
  push:
    branches:
      - main
      - beta

jobs:
  release:
    name: Semantic Release
    runs-on: ubuntu-20.04
    steps:
      - name: Checkout
        uses: actions/checkout@v2

      - name: Execute Semantic Release
        id: semantic
        uses: cycjimmy/semantic-release-action@v2
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

      - name: Build & Publish assets
        if: steps.semantic.outputs.new_release_published == 'true'
        uses: wangyoucao577/go-release-action@v1.24
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          goos: windows
          goarch: amd64
          goversion: 1.17
          binary_name: af-contest
          ldflags: -X github.com/indisrl/ideacall/cmd.ReleaseVersion=${{ steps.semantic.outputs.new_release_version }}
          release_tag: v${{ steps.semantic.outputs.new_release_version }}

@gvart-sellics
Copy link

Hi there, I've managed to fix it by adding:

with:
   semantic_version: 18

@jorgebodega
Copy link
Author

Sure, that is what i did, but i prefer to mantain the correct stable verison on semantic-release than just change this to use an older version.

For me, that is just a workaround, not a good choice

cycjimmy added a commit that referenced this issue Mar 3, 2022
switch operating environment to node16

BREAKING CHANGE: switch operating environment to node16

#92, #96
github-actions bot pushed a commit that referenced this issue Mar 3, 2022
# [3.0.0](v2.7.0...v3.0.0) (2022-03-03)

### Features

* switch operating environment to node16 ([b5f16ae](b5f16ae)), closes [#92](#92) [#96](#96)

### BREAKING CHANGES

* switch operating environment to node16
@cycjimmy
Copy link
Owner

cycjimmy commented Mar 3, 2022

Sorry, the error is due to the latest semantic-release@19 no longer supporting environments below node16. Try using cycjimmy/semantic-release-action@v3 to fix the error.

@jorgebodega
Copy link
Author

Let me check this, I'll let you know

@jorgebodega
Copy link
Author

I confirm that is working now. Thanks for your work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants