diff --git a/.github/workflows/package_agent.yml b/.github/workflows/package_agent.yml index f85a8216..ce0e6ad8 100644 --- a/.github/workflows/package_agent.yml +++ b/.github/workflows/package_agent.yml @@ -4,7 +4,6 @@ name: Package Agent branches: - master - release - - asdasd permissions: id-token: write # This is required for requesting the JWT @@ -17,9 +16,10 @@ jobs: fail-fast: true matrix: os: - - ubuntu-latest - - macos-latest - - windows-latest + - ubuntu-22.04 + - macos-13 + - macos-14 + - windows-2022 node-version: - 20.9.0 steps: @@ -31,12 +31,12 @@ jobs: with: node-version: ${{ matrix.node-version }} - - name: Cache - id: cache-packages - uses: actions/cache@v4 - with: - path: node_modules - key: ${{ runner.os }}-node${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }} + # - name: Cache + # id: cache-packages + # uses: actions/cache@v4 + # with: + # path: node_modules + # key: new-${{ runner.os }}-node${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }} - name: Install packages if: steps.cache-packages.outputs.cache-hit != 'true' @@ -45,7 +45,7 @@ jobs: - name: Build with Node.js ${{ matrix.node-version }} on ${{ runner.os }} env: CI: true - if: ${{ matrix.os == 'ubuntu-latest' }} + if: ${{ matrix.os == 'ubuntu-22.04' }} run: | npm run build node --experimental-sea-config sea-config.json @@ -62,9 +62,9 @@ jobs: - name: Build with Node.js ${{ matrix.node-version }} on ${{ runner.os }} env: CI: true - if: ${{ matrix.os == 'macos-latest' }} + if: ${{ matrix.os == 'macos-13' }} run: | - + ls -al npm run build node --experimental-sea-config sea-config.json cp $(command -v node) agent @@ -79,11 +79,32 @@ jobs: cp agent bin/cli-macos-x64 npm run afterbuild ls -al bin + + - name: Build with Node.js ${{ matrix.node-version }} on ${{ runner.os }} + env: + CI: true + if: ${{ matrix.os == 'macos-14' }} + run: | + + npm run build + node --experimental-sea-config sea-config.json + cp $(command -v node) agent + codesign --remove-signature agent + npx postject agent NODE_SEA_BLOB agent.blob \ + --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2 \ + --macho-segment-name NODE_SEA + # codesign --sign - agent + + mkdir bin + chmod +x agent + cp agent bin/cli-macos-arm64 + npm run afterbuild + ls -al bin - name: Build with Node.js ${{ matrix.node-version }} on ${{ runner.os }} env: CI: true - if: ${{ matrix.os == 'windows-latest' }} + if: ${{ matrix.os == 'windows-2022' }} run: | npm run build node --experimental-sea-config sea-config.json @@ -107,7 +128,7 @@ jobs: - name: Upload Windows x64 artifact uses: actions/upload-artifact@v4 - if: ${{ matrix.os == 'windows-latest' }} + if: ${{ matrix.os == 'windows-2022' }} with: name: katalon-agent-win-x64-${{ env.BUILD_VERSION }} path: | @@ -117,7 +138,7 @@ jobs: - name: Upload Windows x86 artifact uses: actions/upload-artifact@v4 - if: ${{ matrix.os == 'windows-latest' }} + if: ${{ matrix.os == 'windows-2022' }} with: name: katalon-agent-win-x86-${{ env.BUILD_VERSION }} path: | @@ -127,7 +148,7 @@ jobs: - name: Upload Linux x64 artifact uses: actions/upload-artifact@v4 - if: ${{ matrix.os == 'ubuntu-latest' }} + if: ${{ matrix.os == 'ubuntu-22.04' }} with: name: katalon-agent-linux-x64-${{ env.BUILD_VERSION }} path: | @@ -136,12 +157,21 @@ jobs: - name: Upload MacOS x64 artifact uses: actions/upload-artifact@v4 - if: ${{ matrix.os == 'macos-latest' }} + if: ${{ matrix.os == 'macos-13' }} with: name: katalon-agent-macos-x64-${{ env.BUILD_VERSION }} path: | bin/cli-macos-x64 bin/start.sh + + - name: Upload MacOS ARM64 artifact + uses: actions/upload-artifact@v4 + if: ${{ matrix.os == 'macos-14' }} + with: + name: katalon-agent-macos-arm64-${{ env.BUILD_VERSION }} + path: | + bin/cli-macos-arm64 + bin/start.sh deploy: name: Deploy staging cloud agent @@ -195,6 +225,7 @@ jobs: zip -9 -j packages/katalon-agent-win-x86-$BUILD_VERSION.zip katalon-agent-win-x86-$BUILD_VERSION/* zip -9 -j packages/katalon-agent-linux-x64-$BUILD_VERSION.zip katalon-agent-linux-x64-$BUILD_VERSION/* zip -9 -j packages/katalon-agent-macos-x64-$BUILD_VERSION.zip katalon-agent-macos-x64-$BUILD_VERSION/* + zip -9 -j packages/katalon-agent-macos-arm64-$BUILD_VERSION.zip katalon-agent-macos-arm64-$BUILD_VERSION/* cd katalon-agent-linux-x64-$BUILD_VERSION tar cvzf ../packages/katalon-agent-linux-x64-$BUILD_VERSION.tar.gz * cd .. diff --git a/.github/workflows/publish_agent.yml b/.github/workflows/publish_agent.yml index 518f6601..91f4a1c7 100644 --- a/.github/workflows/publish_agent.yml +++ b/.github/workflows/publish_agent.yml @@ -37,9 +37,10 @@ jobs: fail-fast: true matrix: os: - - ubuntu-latest - - macos-latest - - windows-latest + - ubuntu-22.04 + - macos-13 + - macos-14 + - windows-2022 node-version: - 20.9.0 @@ -61,7 +62,7 @@ jobs: - name: Build with Node.js ${{ matrix.node-version }} on ${{ runner.os }} env: CI: true - if: ${{ matrix.os == 'ubuntu-latest' }} + if: ${{ matrix.os == 'ubuntu-22.04' }} run: | npm run build node --experimental-sea-config sea-config.json @@ -78,7 +79,27 @@ jobs: - name: Build with Node.js ${{ matrix.node-version }} on ${{ runner.os }} env: CI: true - if: ${{ matrix.os == 'macos-latest' }} + if: ${{ matrix.os == 'macos-13' }} + run: | + npm run build + node --experimental-sea-config sea-config.json + cp $(command -v node) agent + codesign --remove-signature agent + npx postject agent NODE_SEA_BLOB agent.blob \ + --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2 \ + --macho-segment-name NODE_SEA + # codesign --sign - agent + + mkdir bin + chmod +x agent + mv agent bin/cli-macos-x64 + npm run afterbuild + ls -al bin + + - name: Build with Node.js ${{ matrix.node-version }} on ${{ runner.os }} + env: + CI: true + if: ${{ matrix.os == 'macos-14' }} run: | npm run build node --experimental-sea-config sea-config.json @@ -98,7 +119,7 @@ jobs: - name: Build with Node.js ${{ matrix.node-version }} on ${{ runner.os }} env: CI: true - if: ${{ matrix.os == 'windows-latest' }} + if: ${{ matrix.os == 'windows-2022' }} run: | npm run build node --experimental-sea-config sea-config.json @@ -119,7 +140,7 @@ jobs: - name: Upload Windows x64 artifact uses: actions/upload-artifact@v4 - if: ${{ matrix.os == 'windows-latest' }} + if: ${{ matrix.os == 'windows-2022' }} with: name: katalon-agent-win-x64-${{ env.AGENT_VERSION }} path: | @@ -129,7 +150,7 @@ jobs: - name: Upload Windows x86 artifact uses: actions/upload-artifact@v4 - if: ${{ matrix.os == 'windows-latest' }} + if: ${{ matrix.os == 'windows-2022' }} with: name: katalon-agent-win-x86-${{ env.AGENT_VERSION }} path: | @@ -139,7 +160,7 @@ jobs: - name: Upload Linux x64 artifact uses: actions/upload-artifact@v4 - if: ${{ matrix.os == 'ubuntu-latest' }} + if: ${{ matrix.os == 'ubuntu-22.04' }} with: name: katalon-agent-linux-x64-${{ env.AGENT_VERSION }} path: | @@ -148,13 +169,22 @@ jobs: - name: Upload MacOS x64 artifact uses: actions/upload-artifact@v4 - if: ${{ matrix.os == 'macos-latest' }} + if: ${{ matrix.os == 'macos-13' }} with: name: katalon-agent-macos-x64-${{ env.AGENT_VERSION }} path: | bin/cli-macos-x64 bin/start.sh + - name: Upload MacOS ARM64 artifact + uses: actions/upload-artifact@v4 + if: ${{ matrix.os == 'macos-14' }} + with: + name: katalon-agent-macos-arm64-${{ env.AGENT_VERSION }} + path: | + bin/cli-macos-arm64 + bin/start.sh + ### RELEASE ### release: name: Release @@ -207,6 +237,7 @@ jobs: zip -9 -j packages/katalon-agent-win-x86-$AGENT_VERSION.zip katalon-agent-win-x86-$AGENT_VERSION/* zip -9 -j packages/katalon-agent-linux-x64-$AGENT_VERSION.zip katalon-agent-linux-x64-$AGENT_VERSION/* zip -9 -j packages/katalon-agent-macos-x64-$AGENT_VERSION.zip katalon-agent-macos-x64-$AGENT_VERSION/* + zip -9 -j packages/katalon-agent-macos-arm64-$AGENT_VERSION.zip katalon-agent-macos-arm64-$AGENT_VERSION/* cd katalon-agent-linux-x64-$AGENT_VERSION tar cvzf ../packages/katalon-agent-linux-x64-$AGENT_VERSION.tar.gz * diff --git a/package.json b/package.json index 3788a68e..3631c928 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "katalon-agent", - "version": "v2.3.1", + "version": "v2.3.2", "description": "", "main": "cli.js", "scripts": {