2024-04-14 13:15:47 -07:00
|
|
|
name: Deploy Lib
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: ["master"]
|
2024-04-14 13:22:40 -07:00
|
|
|
paths: [".gitea/workflows/deploy-lib.yml", "Lib/**"]
|
2024-04-14 13:15:47 -07:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
docker:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
arch: ["ubuntu-latest"]
|
|
|
|
git-version: ["2.44.0"]
|
|
|
|
runs-on: ${{ matrix.arch }}
|
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
working-directory: ./Lib
|
|
|
|
|
|
|
|
# Steps to run
|
|
|
|
steps:
|
|
|
|
# Checkout the repo
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
|
2024-04-14 13:48:15 -07:00
|
|
|
# Setup Bun
|
|
|
|
- name: Setup Bun
|
|
|
|
uses: oven-sh/setup-bun@v1
|
2024-04-14 14:18:40 -07:00
|
|
|
with:
|
|
|
|
registry-url: "https://registry.npmjs.org"
|
2024-04-14 13:48:15 -07:00
|
|
|
|
2024-04-14 13:33:44 -07:00
|
|
|
# Install Dependencies
|
|
|
|
- name: Install Dependencies
|
2024-04-14 13:38:41 -07:00
|
|
|
run: bun install --frozen-lockfile
|
2024-04-14 14:18:40 -07:00
|
|
|
env:
|
|
|
|
BUN_AUTH_TOKEN: ${{ secrets.PUBLISH_NPM_TOKEN }}
|
2024-04-14 13:33:44 -07:00
|
|
|
|
2024-04-14 13:19:18 -07:00
|
|
|
# Run Tests
|
|
|
|
- name: Run Tests
|
|
|
|
run: bun test
|
|
|
|
|
|
|
|
# Publish to NPM
|
2024-04-14 13:15:47 -07:00
|
|
|
- name: Publish to NPM
|
2024-04-14 14:04:04 -07:00
|
|
|
run: npm publish
|
2024-04-14 14:21:47 -07:00
|
|
|
env:
|
|
|
|
NODE_AUTH_TOKEN: ${{ secrets.PUBLISH_NPM_TOKEN }}
|