fix(bump): node-llama-cpp@beta version #83
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- '*' | |
tags: | |
- '*' | |
jobs: | |
release: | |
name: Build & Release | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./server | |
concurrency: release-${{ github.ref }} | |
permissions: | |
pages: write | |
id-token: write | |
contents: write | |
issues: write | |
pull-requests: write | |
environment: | |
name: npm | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: "20" | |
- name: Install modules & build | |
run: | | |
npm ci --ignore-scripts | |
npm run prepack | |
- name: Generate docs | |
run: | | |
npm run generate-docs | |
- name: Release | |
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/beta' | |
id: release-package | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: | | |
npm run semantic-release && echo "npm-success=true" >> $GITHUB_OUTPUT | |
- name: Upload build artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: "docs" | |
path: "server/docs" | |
- name: Upload docs to GitHub Pages | |
if: steps.release-package.outputs.npm-success != '' | |
uses: actions/upload-pages-artifact@v2 | |
with: | |
name: pages-docs | |
path: server/docs | |
- name: Deploy docs to GitHub Pages | |
if: steps.release-package.outputs.npm-success != '' | |
uses: actions/deploy-pages@v2 | |
with: | |
artifact_name: pages-docs | |