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

Does not support configured Node.js version #96

Closed
kettanaito opened this issue Mar 2, 2022 · 5 comments
Closed

Does not support configured Node.js version #96

kettanaito opened this issue Mar 2, 2022 · 5 comments

Comments

@kettanaito
Copy link

kettanaito commented Mar 2, 2022

Describe the bug
A clear and concise description of what the bug is.

Semantic release action disregards the Node.js version previously configured in the same job.

Workflow

Expected behavior

Semantic release must execute itself and any sub-commands using the globally available Node.js version (in the case above 16.14.0, not 12.13.1).

Additional context
Looks like it fallbacks to some default Node.js version but I see no options to disable this fallback.

name: release
on:
  schedule:
    - cron: '0 23 * * *'
  workflow_dispatch:
jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2

      - name: Setup Node.js
        uses: actions/setup-node@v2
        with:
          # Explicitly setting an LTS version of Node.js
          node-version: 16.14.0

      - name: Install dependencies
        uses: bahmutov/npm-install@v1

      - name: Build
        run: yarn build

      - name: Test
        run: yarn test

      - name: Release
        # This will still use Node.js 12.13.1
        uses: cycjimmy/semantic-release-action@v2
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
@kettanaito
Copy link
Author

The issue may originate from here:

using: 'node12'

This must not be hard-coded. Overall, version 12 is archaic at this time and it'd be great for this action to use LTS for better stability and not to block other tools that wish to migrate to the recent version of Node.js.

@kettanaito
Copy link
Author

I am willing to open a pull request if you can guide me through the approach you find suitable here. I'd either set using: 'node16' or removed that property at all (if that's allowed) so the Node.js version is inferred from the environment.

@cycjimmy
Copy link
Owner

cycjimmy commented Mar 3, 2022

Thanks for your suggestion. I will switch to 'node16' soon after checking the compatibility.

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

I switch to node16 for the running environment of action. Try using cycjimmy/semantic-release-action@v3 to fix the error.
Thanks for your issue. 👍

@cycjimmy cycjimmy closed this as completed Mar 3, 2022
@kettanaito
Copy link
Author

Thank you for your swift action on this, @cycjimmy! 🎉

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

2 participants