Skip to content

feat: better error handling when file/dir not found #29

feat: better error handling when file/dir not found

feat: better error handling when file/dir not found #29

Workflow file for this run

name: Prebuild + Publish
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
branches: ['master']
release:
types: [published]
jobs:
prebuild:
name: Prebuild
strategy:
matrix:
include:
- os: ubuntu-latest
arch: x64
- os: macos-latest
arch: arm64
- os: macos-latest
arch: x64
- os: windows-latest
arch: x64
runs-on: ${{ matrix.os }}
steps:
- name: Clone Repo
uses: actions/checkout@v6
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: lts/*
architecture: ${{ matrix.arch }}
- name: Setup sccache
uses: hendrikmuhs/ccache-action@v1.2.20
with:
variant: sccache
create-symlink: ${{ runner.os != 'Windows' }}
update-package-index: false
key: ${{ matrix.os }}-${{ matrix.arch }}-sccache
- name: Compile
env:
CMAKE_CXX_COMPILER_LAUNCHER: sccache
CMAKE_C_COMPILER_LAUNCHER: sccache
RUSTC_WRAPPER: sccache
run: npm ci
- name: Copy Prebuild
run: npm run copyPrebuild
- name: Upload Prebuild Artifact
uses: actions/upload-artifact@v6
with:
name: prebuild-${{ matrix.os }}-${{ matrix.arch }}
if-no-files-found: error
path: prebuilds
overwrite: true
publish:
name: Publish
runs-on: ubuntu-latest
needs: prebuild
if: startsWith(github.ref, 'refs/tags/')
permissions:
contents: read
id-token: write
steps:
- name: Clone Repo
uses: actions/checkout@v6
- name: Setup Node
uses: actions/setup-node@v6
with:
registry-url: https://registry.npmjs.org/
- name: Download Artifacts
uses: actions/download-artifact@v7
with:
path: prebuilds
merge-multiple: true
- name: NPM Install
run: npm ci
- name: NPM Publish
run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}