diff --git a/.github/workflows/if-nodejs-pr-testing.yml b/.github/workflows/if-nodejs-pr-testing.yml index 27a4dbdc205..6373588d1e6 100644 --- a/.github/workflows/if-nodejs-pr-testing.yml +++ b/.github/workflows/if-nodejs-pr-testing.yml @@ -19,33 +19,33 @@ jobs: - if: > !github.event.pull_request.draft && !( (github.actor == 'asyncapi-bot' && ( - startsWith(github.event.pull_request.title, 'ci: update global workflows') || - startsWith(github.event.pull_request.title, 'chore: update code of conduct') || - startsWith(github.event.pull_request.title, 'ci: update global contribution guide') || - startsWith(github.event.pull_request.title, 'ci: update workflows for go projects') || - startsWith(github.event.pull_request.title, 'ci: update workflows for nodejs projects') || - startsWith(github.event.pull_request.title, 'ci: update release-related workflows for nodejs projects') || - startsWith(github.event.pull_request.title, 'ci: update semantic release config file') || - startsWith(github.event.pull_request.title, 'ci: update generic workflows') || + startsWith(github.event.pull_request.title, 'ci: update global workflows') || + startsWith(github.event.pull_request.title, 'chore: update code of conduct') || + startsWith(github.event.pull_request.title, 'ci: update global contribution guide') || + startsWith(github.event.pull_request.title, 'ci: update workflows for go projects') || + startsWith(github.event.pull_request.title, 'ci: update workflows for nodejs projects') || + startsWith(github.event.pull_request.title, 'ci: update release-related workflows for nodejs projects') || + startsWith(github.event.pull_request.title, 'ci: update semantic release config file') || + startsWith(github.event.pull_request.title, 'ci: update generic workflows') || startsWith(github.event.pull_request.title, 'ci: update workflows for docker-based projects') || startsWith(github.event.pull_request.title, 'chore(release):') )) || - (github.actor == 'allcontributors[bot]' && + (github.actor == 'allcontributors[bot]' && startsWith(github.event.pull_request.title, 'docs: add') ) ) id: should_run name: Should Run run: echo "shouldrun=true" >> $GITHUB_OUTPUT - - if: steps.should_run.outputs.shouldrun == 'true' + - if: steps.should_run.outputs.shouldrun == 'true' name: Set git to use LF #to once and for all finish neverending fight between Unix and Windows run: | git config --global core.autocrlf false git config --global core.eol lf - - if: steps.should_run.outputs.shouldrun == 'true' + - if: steps.should_run.outputs.shouldrun == 'true' name: Checkout repository uses: actions/checkout@v3 - - if: steps.should_run.outputs.shouldrun == 'true' + - if: steps.should_run.outputs.shouldrun == 'true' name: Check if Node.js project and has package.json id: packagejson run: test -e ./package.json && echo "exists=true" >> $GITHUB_OUTPUT || echo "exists=false" >> $GITHUB_OUTPUT @@ -54,7 +54,7 @@ jobs: name: Setup Node.js uses: actions/setup-node@v3 with: - node-version: 14 + node-version: 16 cache: 'npm' cache-dependency-path: '**/package-lock.json' - if: steps.packagejson.outputs.exists == 'true' @@ -64,7 +64,7 @@ jobs: continue-on-error: true - if: steps.first-installation.outputs.status == 'failure' && steps.packagejson.outputs.exists == 'true' name: Clear NPM cache and install deps again - run: | + run: | npm cache clean --force npm install --loglevel verbose - if: steps.packagejson.outputs.exists == 'true' diff --git a/.github/workflows/upload-release-assets.yml b/.github/workflows/upload-release-assets.yml index f0f9b319f45..ae2a98826c6 100644 --- a/.github/workflows/upload-release-assets.yml +++ b/.github/workflows/upload-release-assets.yml @@ -30,7 +30,11 @@ jobs: - os: macos-latest npm_script: pack:macos dist_folder: macos - extension: pkg + extension: arm64.pkg + - os: macos-latest + npm_script: pack:macos + dist_folder: macos + extension: x64.pkg steps: - name: Checkout repository uses: actions/checkout@v3 diff --git a/docs/installation.md b/docs/installation.md index eb19a85b275..3f78961596c 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -39,10 +39,14 @@ brew install asyncapi ``` #### `pkg` installation -Every release of the AsyncAPI CLI has its own macOS dedicated `pkg` file that enables you to install the CLI tool as a macOS application. +Every release of the AsyncAPI CLI has two macOS dedicated `pkg` file that enables you to install the CLI tool as a macOS application for x64 as well as arm64 architecture. To download the latest CLI release, run this command in your terminal: ```sh -curl -OL https://github.com/asyncapi/cli/releases/latest/download/asyncapi.pkg +# For x64 +curl -OL https://github.com/asyncapi/cli/releases/latest/download/asyncapi.x64.pkg + +# For arm64 +curl -OL https://github.com/asyncapi/cli/releases/latest/download/asyncapi.arm64.pkg ``` To download a specific CLI release, run this command in your terminal: @@ -103,4 +107,4 @@ ln -s /bin/asyncapi /user/local/bin/asyncapi # The "asyncapi" command should be available to be used asyncapi -``` \ No newline at end of file +``` diff --git a/scripts/releasePackagesRename.js b/scripts/releasePackagesRename.js index 5786b3d33a1..6e9421aed3d 100644 --- a/scripts/releasePackagesRename.js +++ b/scripts/releasePackagesRename.js @@ -16,7 +16,7 @@ async function fileExists(checkPath) { } async function checkAndRenameFile(generatedPath, newPath) { - if (await fileExists(generatedPath)) { + if (await fileExists(generatedPath)) { await rename(generatedPath, newPath); } } @@ -46,11 +46,11 @@ async function renameTar({version, name, sha}) { await checkAndRenameFile(generatedPath, newPath); } -async function renamePkg({version, name, sha}) { +async function renamePkg({version, name, sha, arch}) { const dist = 'dist/macos'; - const generatedPath = path.resolve(dist, `${name}-v${version}-${sha}.pkg`); - const newPath = path.resolve(dist, 'asyncapi.pkg'); + const generatedPath = path.resolve(dist, `${name}-v${version}-${sha}-${arch}.pkg`); + const newPath = path.resolve(dist, `asyncapi.${arch}.pkg`); await checkAndRenameFile(generatedPath, newPath); } @@ -59,7 +59,8 @@ async function renamePackages() { const name = 'asyncapi'; const sha = await git.revparse(['--short', 'HEAD']); await renameDeb({version: version.split('-')[0], name, sha}); - await renamePkg({version, name, sha}); + await renamePkg({version, name, sha, arch: 'x64'}); + await renamePkg({version, name, sha, arch: 'arm64'}); await renameTar({version, name, sha}); }