mirror of
https://github.com/versia-pub/api.git
synced 2025-12-06 08:28:19 +01:00
32 lines
761 B
YAML
32 lines
761 B
YAML
name: Build & Publish NPM Package
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
tags: ["v*.*.*"]
|
|
|
|
# Allows you to run this workflow manually from the Actions tab
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
# Build job
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- uses: oven-sh/setup-bun@v1
|
|
|
|
- name: Create bunfig.toml with NPM token (GitHub Secrets)
|
|
run: echo -e "[install]\nregistry = { url = \"https://registry.npmjs.org/\", token = "${{ secrets.NPM_TOKEN }}" }" > bunfig.toml
|
|
|
|
- name: Install dependencies
|
|
run: bun install --frozen-lockfile --production
|
|
|
|
- name: Build
|
|
run: bun run build
|
|
|
|
- name: Publish to NPM
|
|
run: bunx @morlay/bunpublish --provenance
|