chore(biome): fix optional chaining cases (#987) #55
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Node CI | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- 'v*' | |
workflow_dispatch: | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: ['20.x', '21.x'] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: npm install, build and test | |
run: | | |
npm install | |
npm run build --if-present | |
npm test | |
env: | |
CI: true | |
deno-build: | |
strategy: | |
matrix: | |
os: [windows, macos, ubuntu] | |
include: | |
- os: windows | |
build: | | |
deno compile --allow-read --allow-env --allow-run --allow-sys=uid,systemMemoryInfo,gid,osRelease --allow-write --allow-net --output cdxgenx.exe bin/cdxgen.js | |
.\cdxgenx.exe --help | |
(Get-FileHash .\cdxgenx.exe).hash | Out-File -FilePath .\cdxgenx.exe.sha256 | |
artifact: cdxgenx.exe | |
- os: macos | |
build: | | |
deno compile --allow-read --allow-env --allow-run --allow-sys=uid,systemMemoryInfo,gid --allow-write --allow-net --target x86_64-apple-darwin --output cdxgenx-darwin-amd64 bin/cdxgen.js | |
./cdxgenx-darwin-amd64 --help | |
shasum -a 256 cdxgenx-darwin-amd64 > cdxgenx-darwin-amd64.sha256 | |
deno compile --allow-read --allow-env --allow-run --allow-sys=uid,systemMemoryInfo,gid --allow-write --allow-net --target aarch64-apple-darwin --output cdxgenx-darwin-arm64 bin/cdxgen.js | |
shasum -a 256 cdxgenx-darwin-arm64 > cdxgenx-darwin-arm64.sha256 | |
artifact: cdxgenx-darwin-amd64 | |
- os: ubuntu | |
build: | | |
deno compile --allow-read --allow-env --allow-run --allow-sys=uid,systemMemoryInfo,gid --allow-write --allow-net --output cdxgenx bin/cdxgen.js | |
shasum -a 256 cdxgenx > cdxgenx.sha256 | |
chmod + cdxgenx | |
./cdxgenx --help | |
artifact: cdxgenx | |
runs-on: ${{ matrix.os }}-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: denoland/setup-deno@v1 | |
with: | |
deno-version: v1.x | |
- name: deno compile | |
run: | | |
mkdir build | |
${{ matrix.build }} | |
continue-on-error: true | |
# - name: Release | |
# uses: softprops/action-gh-release@v1 | |
# if: startsWith(github.ref, 'refs/tags/') | |
# with: | |
# files: | | |
# ${{ matrix.artifact }} | |
# ${{ matrix.artifact }}.sha256 | |
# cdxgenx-darwin-arm64 | |
# cdxgenx-darwin-arm64.sha256 | |