Skip to content

Added build action

Added build action #11

Workflow file for this run

name: Node.js CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
- run: bun install
- run: bun run build
test:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: oven-sh/setup-bun@v1
- run: bun install
- run: bun test
publish:
needs: [build, test]

Check failure on line 27 in .github/workflows/build.yml

View workflow run for this annotation

GitHub Actions / Node.js CI

Invalid workflow file

The workflow is not valid. .github/workflows/build.yml (Line: 27, Col: 5): Required property is missing: runs-on
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
- uses: actions/setup-node@v4
with:
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
- name: Check if version has been updated
id: check
uses: EndBug/version-check@v2
- run: bun install
if: steps.check.outputs.changed == 'true'
- run: bun run build
if: steps.check.outputs.changed == 'true'
- run: npm publish --access public
if: steps.check.outputs.changed == 'true'
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: 'echo "Package version has not been updated, skipping publish"'
if: steps.check.outputs.changed == 'false'