From d3b210179a0d4e9a668e8e476e9205d178321a35 Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Sat, 29 Apr 2023 21:48:01 +0800 Subject: [PATCH 01/18] feat: add release workflow --- .github/workflows/release.yml | 44 +++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..3622940 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,44 @@ +name: Build and Release + +on: + push: + tags: + - "v*.*.*" + +jobs: + build-and-release: + runs-on: ${{ matrix.runs-on }} + strategy: + matrix: + runs-on: [ubuntu-latest, windows-latest, macOS-latest] + arch: [x64, arm64] + node-version: ['18'] + include: + - runs-on: ubuntu-latest + os: linux + - runs-on: windows-latest + os: win + - runs-on: macOS-latest + os: macos + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Package Node.js binary with pkg + id: pkg-action + uses: lando/pkg-action@v2 + with: + entrypoint: bin/cli + arch: ${{ matrix.arch }} + node-version: ${{ matrix.node-version }} + os: ${{ matrix.os }} + + - name: Release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + files: | + ${{ steps.pkg-action.outputs.file }} + name: Release-${{ matrix.os }}-${{ matrix.arch }} + tag_name: ${{ github.ref }} + From b1b4b9f4b1b86e869b89421c0d92f579ac0d52e9 Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Sat, 29 Apr 2023 21:49:18 +0800 Subject: [PATCH 02/18] fix: cli entrypoint --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3622940..3ef8e81 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,7 +28,7 @@ jobs: id: pkg-action uses: lando/pkg-action@v2 with: - entrypoint: bin/cli + entrypoint: bin/run arch: ${{ matrix.arch }} node-version: ${{ matrix.node-version }} os: ${{ matrix.os }} From e4ba0d7d39fe35a24da19891aaa54d2c7c3ba8e3 Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Sat, 29 Apr 2023 22:00:58 +0800 Subject: [PATCH 03/18] feat: config for pkg --- .gitignore | 1 + package.json | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index b384b2e..288c6b2 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ node_modules oclif.manifest.json .env +/exec diff --git a/package.json b/package.json index b61d6f3..69edd82 100644 --- a/package.json +++ b/package.json @@ -78,5 +78,9 @@ "test": "mocha --forbid-only \"test/**/*.test.ts\"", "version": "oclif readme && git add README.md" }, - "types": "dist/index.d.ts" + "types": "dist/index.d.ts", + "pkg": { + "scripts": "./lib/**/*.js", + "outputPath": "exec" + } } From 4393a2d4a7fc70209dcd4353210b54a392230ae4 Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Sat, 29 Apr 2023 22:02:38 +0800 Subject: [PATCH 04/18] fix: node-version in matrix --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3ef8e81..5d49a74 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,7 +12,7 @@ jobs: matrix: runs-on: [ubuntu-latest, windows-latest, macOS-latest] arch: [x64, arm64] - node-version: ['18'] + node-version: ['node18'] include: - runs-on: ubuntu-latest os: linux From 50cdc03a5fee06702e6524118b31c9e13d263f5c Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Sat, 29 Apr 2023 22:06:22 +0800 Subject: [PATCH 05/18] fix: matrix --- .github/workflows/release.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5d49a74..e509525 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,19 +7,19 @@ on: jobs: build-and-release: - runs-on: ${{ matrix.runs-on }} + runs-on: ubuntu-22.04 strategy: matrix: - runs-on: [ubuntu-latest, windows-latest, macOS-latest] - arch: [x64, arm64] - node-version: ['node18'] - include: - - runs-on: ubuntu-latest - os: linux - - runs-on: windows-latest - os: win - - runs-on: macOS-latest - os: macos + arch: + - x64 + - arm64 + node-version: + - node16 + os: + - linux + - macos + - win + steps: - name: Checkout uses: actions/checkout@v3 @@ -28,7 +28,7 @@ jobs: id: pkg-action uses: lando/pkg-action@v2 with: - entrypoint: bin/run + entrypoint: . arch: ${{ matrix.arch }} node-version: ${{ matrix.node-version }} os: ${{ matrix.os }} From 9ccb8c986bbb35eb54329c496511962c998c98b9 Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Sat, 29 Apr 2023 22:08:28 +0800 Subject: [PATCH 06/18] fix: entrypoint --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e509525..1355ad9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,7 +28,7 @@ jobs: id: pkg-action uses: lando/pkg-action@v2 with: - entrypoint: . + entrypoint: ./bin/run arch: ${{ matrix.arch }} node-version: ${{ matrix.node-version }} os: ${{ matrix.os }} From 79d1fb665d31f2f8c2c5ffec508e8cf1f9a55980 Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Sat, 29 Apr 2023 22:15:22 +0800 Subject: [PATCH 07/18] fix: seperate release step --- .github/workflows/release.yml | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1355ad9..43e557b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,7 +6,7 @@ on: - "v*.*.*" jobs: - build-and-release: + build: runs-on: ubuntu-22.04 strategy: matrix: @@ -14,7 +14,7 @@ jobs: - x64 - arm64 node-version: - - node16 + - node18 os: - linux - macos @@ -33,12 +33,27 @@ jobs: node-version: ${{ matrix.node-version }} os: ${{ matrix.os }} + release: + needs: build + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Download binaries + uses: actions/download-artifact@v2 + with: + path: binaries + + - name: Prepare files for release + run: | + mkdir release_assets + mv binaries/*/release-assets/* release_assets/ + - name: Release uses: softprops/action-gh-release@v1 if: startsWith(github.ref, 'refs/tags/') with: - files: | - ${{ steps.pkg-action.outputs.file }} - name: Release-${{ matrix.os }}-${{ matrix.arch }} + files: release_assets/* + name: Release tag_name: ${{ github.ref }} - From 22e5f1113ffd28c0e9f375577cf875b77d923329 Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Sat, 29 Apr 2023 22:22:49 +0800 Subject: [PATCH 08/18] fix: uploaded assets --- .github/workflows/release.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 43e557b..5c01b01 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -45,15 +45,10 @@ jobs: with: path: binaries - - name: Prepare files for release - run: | - mkdir release_assets - mv binaries/*/release-assets/* release_assets/ - - name: Release uses: softprops/action-gh-release@v1 if: startsWith(github.ref, 'refs/tags/') with: - files: release_assets/* + files: binaries/* name: Release tag_name: ${{ github.ref }} From 6e206dc85cd7709c2ad5c49fe4dd4a9378938d24 Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Sat, 29 Apr 2023 22:48:31 +0800 Subject: [PATCH 09/18] fix: binary path --- .github/workflows/release.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5c01b01..d927bc7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -49,6 +49,7 @@ jobs: uses: softprops/action-gh-release@v1 if: startsWith(github.ref, 'refs/tags/') with: - files: binaries/* - name: Release + files: | + binaries/*.* + name: Release ${{ github.ref }} tag_name: ${{ github.ref }} From b7f992da69209d97733df3bb425aee981115b59a Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Sat, 29 Apr 2023 23:15:18 +0800 Subject: [PATCH 10/18] debug --- .github/workflows/release.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d927bc7..c737565 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -45,6 +45,12 @@ jobs: with: path: binaries + + - name: deubg ls binaries + shell: bash + run: | + ls -la binaries + - name: Release uses: softprops/action-gh-release@v1 if: startsWith(github.ref, 'refs/tags/') From 781c33daf91fe9eb90fb431034572360e51f1e9e Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Sat, 29 Apr 2023 23:23:30 +0800 Subject: [PATCH 11/18] fix: glob --- .github/workflows/release.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c737565..e4fc1f9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -41,7 +41,8 @@ jobs: uses: actions/checkout@v3 - name: Download binaries - uses: actions/download-artifact@v2 + id: download + uses: actions/download-artifact@v3 with: path: binaries @@ -49,13 +50,14 @@ jobs: - name: deubg ls binaries shell: bash run: | - ls -la binaries + ls -la ${{steps.download.outputs.download-path}}/* - name: Release uses: softprops/action-gh-release@v1 if: startsWith(github.ref, 'refs/tags/') with: + fail_on_unmatched_files: true files: | - binaries/*.* - name: Release ${{ github.ref }} + ${{steps.download.outputs.download-path}}/* + name: Release ${{ github.ref }}/* tag_name: ${{ github.ref }} From f8a88fe03795ae3833990e88df19fa8066a8280b Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Sat, 29 Apr 2023 23:49:33 +0800 Subject: [PATCH 12/18] fix: zip --- .github/workflows/release.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e4fc1f9..603bd0f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -52,12 +52,22 @@ jobs: run: | ls -la ${{steps.download.outputs.download-path}}/* + - name: Prepare files for release + run: | + mkdir release_assets + cd binaries + for dir in */; do + file_name=$(basename "${dir}" | cut -d'-' -f1-4) + zip -j "../release_assets/${file_name}.zip" "${dir}"* + done + cd .. + - name: Release uses: softprops/action-gh-release@v1 if: startsWith(github.ref, 'refs/tags/') with: fail_on_unmatched_files: true files: | - ${{steps.download.outputs.download-path}}/* + release_assets/*.zip name: Release ${{ github.ref }}/* tag_name: ${{ github.ref }} From e56dd2d72871857506bb656a44ae5ac9bcc3e654 Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Sun, 30 Apr 2023 00:07:20 +0800 Subject: [PATCH 13/18] fix: tag name --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 603bd0f..6e6393a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -69,5 +69,5 @@ jobs: fail_on_unmatched_files: true files: | release_assets/*.zip - name: Release ${{ github.ref }}/* + name: Release ${{ replace(github.ref, 'refs/tags/', '') }} tag_name: ${{ github.ref }} From 285aa5bfba22b9287e9b27ab4dc1a8814358078c Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Sun, 30 Apr 2023 00:12:47 +0800 Subject: [PATCH 14/18] feat: fork pkg-action --- .github/actions/pkg-action/action.yml | 165 ++++++++++++++++++++++++++ .github/workflows/release.yml | 4 +- 2 files changed, 167 insertions(+), 2 deletions(-) create mode 100644 .github/actions/pkg-action/action.yml diff --git a/.github/actions/pkg-action/action.yml b/.github/actions/pkg-action/action.yml new file mode 100644 index 0000000..4266a74 --- /dev/null +++ b/.github/actions/pkg-action/action.yml @@ -0,0 +1,165 @@ +name: "Pkg Action" +description: "A GitHub Action for 'compiling' node projects into binaries using vercel/pkg." +branding: + color: purple + icon: package +inputs: + # Required + entrypoint: + description: "The binary entrypoint path" + required: true + + # Optional + arch: + description: "The architecture to build for x64|amd64|aarch64|arm64" + required: false + default: amd64 + node-version: + description: "The node version to package with" + required: false + default: node14 + options: + description: "Additional options and flags to pass into pkg" + required: false + os: + description: "The operating system to build for win|linux|macos" + required: false + default: ${{ runner.os }} + pkg: + description: "The version on @vercel/pkg to use" + required: false + default: "5.8.0" + test: + description: "Hidden flag for input testing" + default: false + required: false + upload: + description: "Upload the artifacts. Useful if you need to grab them for downstream for things like code signing." + required: false + default: true + +outputs: + file: + description: "The path to the generated binary." + value: ${{ steps.pkg-action.outputs.file }} + artifact-key: + description: "The artifact upload key." + value: ${{ steps.pkg-action.outputs.artifact-key }} + +runs: + using: composite + steps: + - name: Validate required inputs + shell: bash + run: | + echo "::group::Ensure entrypoint is set" + if [ "${{ inputs.entrypoint }}" == "" ]; then + echo "::error title=Entrypoint is not set!::You must specify an entrypoint file in order to run this shit." + exit 47 + fi + echo "::endgroup::" + + - name: Set internal outputs + shell: bash + id: pkg-action-internal + run: | + echo "::group::Setting internal outputs" + if [ "${{ inputs.os }}" == "Linux" ]; then + echo "target-os=linux" >> $GITHUB_OUTPUT + elif [ "${{ inputs.os }}" == "macOS" ]; then + echo "target-os=macos" >> $GITHUB_OUTPUT + elif [ "${{ inputs.os }}" == "Windows" ]; then + echo "target-os=win" >> $GITHUB_OUTPUT + else + echo "target-os=${{ inputs.os }}" >> $GITHUB_OUTPUT + fi + + if [ "${{ inputs.arch }}" == "amd64" ]; then + echo "target-arch=x64" >> $GITHUB_OUTPUT + elif [ "${{ inputs.arch }}" == "aarch64" ]; then + echo "target-arch=arm64" >> $GITHUB_OUTPUT + else + echo "target-arch=${{ inputs.arch }}" >> $GITHUB_OUTPUT + fi + + echo "target-node=${{ inputs.node-version }}" >> $GITHUB_OUTPUT + echo "::endgroup::" + + - name: Install node 16 + uses: actions/setup-node@v3 + with: + node-version: 16 + cache: npm + + - name: Install pkg ${{ inputs.pkg }} + shell: bash + run: | + npm install -g pkg@${{ inputs.pkg }} + if pkg --version >/dev/null; then + echo "::notice title=pkg installed::Using version $(pkg --version)" + else + echo "::error title=Cannot run pkg::Cannot seem to find the pkg binary" + fi + + - name: Set outputs + shell: bash + id: pkg-action + run: | + echo "::group::Setting outputs" + if [ "${{ steps.pkg-action-internal.outputs.target-os }}" == "win" ]; then + echo "file=dist/$(node -p "require('./package.json').name").exe" >> $GITHUB_OUTPUT + else + echo "file=dist/$(node -p "require('./package.json').name")" >> $GITHUB_OUTPUT + fi + + echo "artifact-key=${{ github.event.repository.name }}-${{ steps.pkg-action-internal.outputs.target-node }}-${{ steps.pkg-action-internal.outputs.target-os }}-${{ steps.pkg-action-internal.outputs.target-arch }}-${{ github.sha }}" >> $GITHUB_OUTPUT + echo "::endgroup::" + + - name: Run x64 pkg command + if: inputs.test != 'true' && steps.pkg-action-internal.outputs.target-arch == 'x64' + shell: bash + run: | + pkg \ + --target=${{ steps.pkg-action-internal.outputs.target-node }}-${{ steps.pkg-action-internal.outputs.target-os }}-${{ steps.pkg-action-internal.outputs.target-arch }} \ + --out-path dist \ + --debug \ + ${{ inputs.options }} \ + ${{ inputs.entrypoint }} + stat ${{ steps.pkg-action.outputs.file }} + + - name: Run arm64 pkg command + if: inputs.test != 'true' && steps.pkg-action-internal.outputs.target-arch == 'arm64' + uses: uraimo/run-on-arch-action@v2 + with: + arch: aarch64 + # @TODO: eventually we need to get this to work on ubuntu20.04 for build parity but we are using + # 18.04 because it was easier to get working, apparently there is a bug in 20.04s gpg? + distro: ubuntu18.04 + githubToken: ${{ github.token }} + # We need to install node and yarn "again" because they dont exist inside our build container + install: | + apt update && apt -y install curl + curl -fsSL https://deb.nodesource.com/setup_14.x | bash - + apt-get install -y nodejs + curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - + echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list + apt update && apt -y install yarn + yarn global add pkg@${{ inputs.pkg }} --prefix /usr/local + pkg --version + run: | + pkg \ + --target=${{ steps.pkg-action-internal.outputs.target-node }}-${{ steps.pkg-action-internal.outputs.target-os }}-${{ steps.pkg-action-internal.outputs.target-arch }} \ + --out-path dist \ + --debug \ + ${{ inputs.options }} \ + ${{ inputs.entrypoint }} + stat ${{ steps.pkg-action.outputs.file }} + + - name: Upload ${{ steps.pkg-action.outputs.artifact-key }} + if: inputs.test != 'true' && inputs.upload == 'true' + uses: actions/upload-artifact@v3 + with: + name: ${{ steps.pkg-action.outputs.artifact-key }} + path: ${{ steps.pkg-action.outputs.file }} + if-no-files-found: error + retention-days: 1 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6e6393a..99207a4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,9 +26,9 @@ jobs: - name: Package Node.js binary with pkg id: pkg-action - uses: lando/pkg-action@v2 + uses: ./.github/actions/pkg-action with: - entrypoint: ./bin/run + entrypoint: . arch: ${{ matrix.arch }} node-version: ${{ matrix.node-version }} os: ${{ matrix.os }} From 9292fd942fa92c08a6cfec90a06749d62c8d8b5e Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Sun, 30 Apr 2023 00:19:26 +0800 Subject: [PATCH 15/18] fix: tag name --- .github/workflows/release.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 99207a4..79567d9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -62,6 +62,10 @@ jobs: done cd .. + - name: Extract tag name + id: get_version + run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} + - name: Release uses: softprops/action-gh-release@v1 if: startsWith(github.ref, 'refs/tags/') @@ -69,5 +73,5 @@ jobs: fail_on_unmatched_files: true files: | release_assets/*.zip - name: Release ${{ replace(github.ref, 'refs/tags/', '') }} + name: Release ${{ steps.get_version.outputs.VERSION }} tag_name: ${{ github.ref }} From 17a3d80f88f21190f35044610aff6c61dde46adb Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Sun, 30 Apr 2023 00:28:45 +0800 Subject: [PATCH 16/18] fix: dist file --- .github/actions/pkg-action/action.yml | 4 ++-- package.json | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/actions/pkg-action/action.yml b/.github/actions/pkg-action/action.yml index 4266a74..543ab80 100644 --- a/.github/actions/pkg-action/action.yml +++ b/.github/actions/pkg-action/action.yml @@ -107,9 +107,9 @@ runs: run: | echo "::group::Setting outputs" if [ "${{ steps.pkg-action-internal.outputs.target-os }}" == "win" ]; then - echo "file=dist/$(node -p "require('./package.json').name").exe" >> $GITHUB_OUTPUT + echo "file=dist/hackmd-cli.exe" >> $GITHUB_OUTPUT else - echo "file=dist/$(node -p "require('./package.json').name")" >> $GITHUB_OUTPUT + echo "file=dist/hackmd-cli" >> $GITHUB_OUTPUT fi echo "artifact-key=${{ github.event.repository.name }}-${{ steps.pkg-action-internal.outputs.target-node }}-${{ steps.pkg-action-internal.outputs.target-os }}-${{ steps.pkg-action-internal.outputs.target-arch }}-${{ github.sha }}" >> $GITHUB_OUTPUT diff --git a/package.json b/package.json index 69edd82..d2d09ef 100644 --- a/package.json +++ b/package.json @@ -80,7 +80,6 @@ }, "types": "dist/index.d.ts", "pkg": { - "scripts": "./lib/**/*.js", - "outputPath": "exec" + "scripts": "./lib/**/*.js" } } From 93292745d6cccb11f7302ae8ca2b7e2ed0784c8d Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Sun, 30 Apr 2023 00:34:57 +0800 Subject: [PATCH 17/18] feat: run build --- .github/workflows/release.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 79567d9..fbadc5b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,6 +24,17 @@ jobs: - name: Checkout uses: actions/checkout@v3 + - name: Install node 16 + uses: actions/setup-node@v3 + with: + node-version: 16 + cache: npm + + - name: Run build + run: | + npm install + npm run build + - name: Package Node.js binary with pkg id: pkg-action uses: ./.github/actions/pkg-action From fee7c8d2c232407a13f411cd0b505a24c8ab09e7 Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Sun, 30 Apr 2023 12:20:59 +0800 Subject: [PATCH 18/18] fix: include arm for zip --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fbadc5b..5411a6c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -68,7 +68,7 @@ jobs: mkdir release_assets cd binaries for dir in */; do - file_name=$(basename "${dir}" | cut -d'-' -f1-4) + file_name=$(basename "${dir}" | cut -d'-' -f1-5) zip -j "../release_assets/${file_name}.zip" "${dir}"* done cd ..