@@ -31,13 +31,13 @@ jobs:
3131 with :
3232 ref : ${{ inputs.tag }}
3333 fetch-tags : true
34-
34+
3535 - name : Get version from package.json
3636 id : get-version
3737 run : |
3838 VERSION=$(node -p "require('./package.json').version")
3939 echo "version=$VERSION" >> $GITHUB_OUTPUT
40-
40+
4141 - name : Validate tag matches version
4242 id : validate-tag
4343 run : |
@@ -59,33 +59,45 @@ jobs:
5959 fi
6060
6161 build-and-test :
62- needs : [get-configs, version-and-tag]
62+ needs : [ get-configs, version-and-tag ]
6363 uses : ./.github/workflows/build-and-test.yml
6464 strategy :
6565 fail-fast : true
6666 matrix :
67- os : [ubuntu-latest , windows-latest, macos-latest]
67+ os : [ ubuntu-22.04 , windows-latest, macos-latest ]
6868 with :
6969 ref : ${{ needs.version-and-tag.outputs.tag }}
7070 runs-on : ${{ matrix.os }}
7171
7272 bundle-and-release :
73- needs : [get-configs, version-and-tag, build-and-test]
73+ needs : [ get-configs, version-and-tag, build-and-test ]
7474 permissions :
7575 contents : write
7676 strategy :
7777 fail-fast : true
7878 matrix :
7979 include :
80- - { os: "ubuntu-latest", arch: "x64", platform: "linux", go-arch: "amd64" }
81- - { os: "ubuntu-latest", arch: "arm64", platform: "linux", go-arch: "arm64" }
82- - { os: "ubuntu-latest", arch: "arm", platform: "linux", go-arch: "arm" }
83- - { os: "ubuntu-22.04", arch: "x64", platform: "linux", go-arch: "amd64" }
84- - { os: "ubuntu-22.04", arch: "arm64", platform: "linux", go-arch: "arm64" }
85- - { os: "ubuntu-22.04", arch: "arm", platform: "linux", go-arch: "arm" }
86- - { os: "macos-latest", arch: "x64", platform: "darwin", go-arch: "amd64" }
87- - { os: "macos-latest", arch: "arm64", platform: "darwin", go-arch: "arm64" }
88- - { os: "windows-latest", arch: "x64", platform: "win32", go-arch: "amd64" }
80+ - { os: "ubuntu-22.04", arch: "x64", platform: "linux", go-arch: "amd64", node-version: "18.x" }
81+ - { os: "ubuntu-22.04", arch: "x64", platform: "linux", go-arch: "amd64", node-version: "20.x" }
82+ - { os: "ubuntu-22.04", arch: "x64", platform: "linux", go-arch: "amd64", node-version: "22.x" }
83+ - { os: "ubuntu-22.04", arch: "arm64", platform: "linux", go-arch: "arm64", node-version: "18.x" }
84+ - { os: "ubuntu-22.04", arch: "arm64", platform: "linux", go-arch: "arm64", node-version: "20.x" }
85+ - { os: "ubuntu-22.04", arch: "arm64", platform: "linux", go-arch: "arm64", node-version: "22.x" }
86+ - { os: "ubuntu-22.04", arch: "arm", platform: "linux", go-arch: "arm", node-version: "18.x" }
87+ - { os: "ubuntu-22.04", arch: "arm", platform: "linux", go-arch: "arm", node-version: "20.x" }
88+ - { os: "ubuntu-22.04", arch: "arm", platform: "linux", go-arch: "arm", node-version: "22.x" }
89+ - { os: "macos-latest", arch: "x64", platform: "darwin", go-arch: "amd64", node-version: "18.x" }
90+ - { os: "macos-latest", arch: "x64", platform: "darwin", go-arch: "amd64", node-version: "20.x" }
91+ - { os: "macos-latest", arch: "x64", platform: "darwin", go-arch: "amd64", node-version: "22.x" }
92+ - { os: "macos-latest", arch: "arm64", platform: "darwin", go-arch: "arm64", node-version: "18.x" }
93+ - { os: "macos-latest", arch: "arm64", platform: "darwin", go-arch: "arm64", node-version: "20.x" }
94+ - { os: "macos-latest", arch: "arm64", platform: "darwin", go-arch: "arm64", node-version: "22.x" }
95+ - { os: "windows-latest", arch: "x64", platform: "win32", go-arch: "amd64", node-version: "18.x" }
96+ - { os: "windows-latest", arch: "x64", platform: "win32", go-arch: "amd64", node-version: "20.x" }
97+ - { os: "windows-latest", arch: "x64", platform: "win32", go-arch: "amd64", node-version: "22.x" }
98+ - { os: "windows-11-arm", arch: "arm64", platform: "win32", go-arch: "arm64", node-version: "18.x" }
99+ - { os: "windows-11-arm", arch: "arm64", platform: "win32", go-arch: "arm64", node-version: "20.x" }
100+ - { os: "windows-11-arm", arch: "arm64", platform: "win32", go-arch: "arm64", node-version: "22.x" }
89101 runs-on : ${{ matrix.os }}
90102 steps :
91103 - uses : actions/checkout@v5
@@ -97,10 +109,10 @@ jobs:
97109 shell : bash
98110 run : echo "Bundling from branch=$(git rev-parse --abbrev-ref HEAD), commit=$(git rev-parse HEAD), tag=$(git describe --tags --exact-match)"
99111
100- - name : Setup Node.js ${{ needs.get-configs.outputs .node-version }} (${{ runner.os }})
112+ - name : Setup Node.js ${{ matrix .node-version }} (${{ runner.os }})
101113 uses : actions/setup-node@v4
102114 with :
103- node-version : ${{ needs.get-configs.outputs .node-version }}
115+ node-version : ${{ matrix .node-version }}
104116 cache : ' npm'
105117
106118 - name : Setup Go ${{ needs.get-configs.outputs.go-version }} (${{ runner.os }})
@@ -144,18 +156,16 @@ jobs:
144156 VERSION=$(node -p "require('./package.json').version")
145157 PLATFORM=${{ matrix.platform }}
146158 ARCH=${{ matrix.arch }}
147-
148- if [[ "${{ matrix.os }}" == "ubuntu-22.04" ]]; then
149- PLATFORM="linux22"
150- fi
159+ NODE_VERSION=${{ matrix.node-version }}
160+ NODE_MAJOR=$(echo $NODE_VERSION | cut -d. -f1)
151161
152162 TAG=${{ needs.version-and-tag.outputs.tag }}
153163 if [[ "$TAG" =~ -alpha$ ]]; then
154- FILE_NAME="${APP_NAME}-${VERSION}-alpha-${PLATFORM}-${ARCH}.zip"
164+ FILE_NAME="${APP_NAME}-${VERSION}-alpha-${PLATFORM}-${ARCH}-node${NODE_MAJOR} .zip"
155165 elif [[ "$TAG" =~ -beta$ ]]; then
156- FILE_NAME="${APP_NAME}-${VERSION}-beta-${PLATFORM}-${ARCH}.zip"
166+ FILE_NAME="${APP_NAME}-${VERSION}-beta-${PLATFORM}-${ARCH}-node${NODE_MAJOR} .zip"
157167 else
158- FILE_NAME="${APP_NAME}-${VERSION}-${PLATFORM}-${ARCH}.zip"
168+ FILE_NAME="${APP_NAME}-${VERSION}-${PLATFORM}-${ARCH}-node${NODE_MAJOR} .zip"
159169 fi
160170
161171 ASSET_NAME=$(echo "$FILE_NAME" | tr '[:upper:]' '[:lower:]')
@@ -167,6 +177,7 @@ jobs:
167177 env :
168178 ASSET_NAME : ${{ steps.set-asset-name.outputs.ASSET_NAME }}
169179 run : |
180+ chmod -R 777 ./bundle/production
170181 echo "Creating zip: ${{ env.ASSET_NAME }}"
171182 (cd ./bundle/production && zip -r ../../${{ env.ASSET_NAME }} .)
172183
@@ -175,6 +186,7 @@ jobs:
175186 env :
176187 ASSET_NAME : ${{ steps.set-asset-name.outputs.ASSET_NAME }}
177188 run : |
189+ icacls ./bundle/production /grant Everyone:F /T
178190 echo "Creating zip: ${{ env.ASSET_NAME }}"
179191 Compress-Archive -Path ./bundle/production/* -DestinationPath ./${{ env.ASSET_NAME }}
180192
0 commit comments