diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e7dbed9..9fd2021 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -5,12 +5,13 @@ on: branches: - main +permissions: + id-token: write + contents: read + jobs: - build: + publish: runs-on: ubuntu-latest - permissions: - contents: read - pull-requests: write steps: - uses: actions/checkout@v6 - uses: actions/setup-node@v6 @@ -19,6 +20,4 @@ jobs: registry-url: "https://registry.npmjs.org" - run: npm install - run: npm run release - - run: npm publish --access public - env: - NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} \ No newline at end of file + - run: npm publish \ No newline at end of file diff --git a/src/index.ts b/src/index.ts index 324659a..781fed7 100644 --- a/src/index.ts +++ b/src/index.ts @@ -13,11 +13,11 @@ const os = require("os"); const semver = require("semver"); const spawn = require("cross-spawn"); -const recommendeVersion: number = 22; +const recommendedVersion: number = 22; const version: string = process.versions.node; -if (recommendeVersion > parseInt(version.split(".")[0])) { +if (recommendedVersion > parseInt(version.split(".")[0])) { pc.red(`You are running Node Version:${version}. -View Generator requires Node ${recommendeVersion} or higher. +View Generator requires Node ${recommendedVersion} or higher. Please update your version of Node.`); process.exit(1); }