Skip to content

xapi-to v0.1.8

xapi-to v0.1.8 #9

Workflow file for this run

# This workflow will run tests using bun and then publish a package to npm when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
name: Node.js Package
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- run: bun install
- run: bun test src/tests
publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- run: bun install
- name: Set version from release tag
run: npm version "${GITHUB_REF_NAME#v}" --no-git-tag-version
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}