RESTfulMC/.gitea/workflows/publish-js-sdk.yml

39 lines
769 B
YAML
Raw Normal View History

2024-04-15 04:20:56 -07:00
name: Publish JS SDK
2024-04-14 13:15:47 -07:00
on:
push:
branches: ["master"]
2024-04-19 07:11:25 -07:00
paths:
[".gitea/workflows/publish-js-sdk.yml", "JS-SDK/**", "!JS-SDK/README.md"]
2024-04-14 13:15:47 -07:00
jobs:
docker:
2024-04-14 14:27:27 -07:00
runs-on: "ubuntu-latest"
2024-04-14 13:15:47 -07:00
defaults:
run:
2024-04-15 04:20:56 -07:00
working-directory: "./JS-SDK"
2024-04-14 13:15:47 -07:00
# 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 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 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:
2024-04-14 14:27:27 -07:00
NPM_TOKEN: ${{ secrets.PUBLISH_NPM_TOKEN }}