33 lines
901 B
YAML
33 lines
901 B
YAML
name: Publish package
|
|
on:
|
|
push:
|
|
workflow_dispatch:
|
|
|
|
# Variables reference: https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#about-contexts
|
|
jobs:
|
|
build_and_publish:
|
|
runs-on: docker
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Cache Bun dependencies
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: ~/.bun/install/cache
|
|
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-bun-
|
|
|
|
- name: Setup Bun
|
|
uses: oven-sh/setup-bun@v2
|
|
|
|
- name: Install Dependencies
|
|
run: bun install
|
|
|
|
- name: Push to registry
|
|
env:
|
|
NPM_REGISTRY_TOKEN: ${{ secrets.NPM_TOKEN_FORGEJO }}
|
|
run: bun publish
|