Skip to content

update actions

update actions #2

Workflow file for this run

on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup clang
run: make apt-install
- name: Build
run: make build
- name: Run clang-tidy
run: make tidy
- name: Run clang-format
run: make format
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: fs-trace-linux-amd64
path: bin/fs-trace
publish-npm:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs: build
runs-on: ubuntu-latest
steps:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "18"
- name: Publish to npm
run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}