Skip to content

Initial setup of log tracing tools #3

Initial setup of log tracing tools

Initial setup of log tracing tools #3

Workflow file for this run

on:
push:
branches:
- main
pull_request:
name: Create Release
jobs:
test:
name: Run tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
- name: Install dependencies
run: npm ci
- name: Lint
run: npm run lint
- name: Check formatting
run: |
npm run format
[[ $(git status --porcelain) ]] && exit 1
- name: Check types
run: npm run typecheck
- name: Run tests
run: npm run coverage
build:
name: Create Release
runs-on: ubuntu-latest
needs: test
if: github.event_name == 'push' && github.ref_name == github.event.repository.default_branch
steps:
- uses: actions/checkout@v4
- name: Check if package version changed
id: check_version
run: |
version="v$(cat package.json | jq -r '.version')"
if [ $(git tag -l "$version") ]; then
echo "Tag $version already exists."
else
echo "version_tag=$version" >> "$GITHUB_OUTPUT"
fi
- uses: actions/setup-node@v4
if: steps.check_version.outputs.version_tag
with:
node-version-file: .nvmrc
cache: npm
# TODO: enable once we are ready
# - name: Create GitHub release
# if: steps.check_version.outputs.version_tag
# run: |
# gh release create ${{ steps.check_version.outputs.version_tag }} --generate-notes
# env:
# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: Publish to NPM
# if: steps.check_version.outputs.version_tag
# run: |
# npm ci
# npm publish --access public
# env:
# NODE_AUTH_TOKEN: ...