1
0
Fork 0
mirror of https://github.com/classchartsapi/classcharts-api-js.git synced 2026-05-14 11:58:13 +00:00

feat: denoify

This commit is contained in:
James Cook 2023-08-30 12:27:01 +01:00
parent f2981dd167
commit 9c39532a9e
31 changed files with 331 additions and 4940 deletions

View file

@ -1,43 +0,0 @@
name: Docs
on:
push:
branches:
- main
jobs:
build-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- uses: pnpm/action-setup@v2
with:
version: 8.2.0
- name: Retrieve the cache
uses: actions/cache@v3
id: node-cache
with:
path: node_modules
key: node-modules-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
- name: Install dependencies
if: steps.node-cache.outputs.cache-hit != 'true'
run: pnpm install
- name: Build
run: pnpm run build
- name: Generate typedoc
run: pnpm generateDocs
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: docs

View file

@ -2,9 +2,8 @@ name: Release
on:
push:
branches:
- main
tags:
- "*"
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
@ -14,26 +13,21 @@ jobs:
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Setup Node.js 18.x
uses: actions/setup-node@v3
- uses: denoland/setup-deno@v1
with:
node-version: 18.x
- name: Install Dependencies
run: npm install -g pnpm && pnpm install
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
deno-version: v1.36.x
- name: Get tag version
if: startsWith(github.ref, 'refs/tags/')
id: get_tag_version
run: echo TAG_VERSION=${GITHUB_REF/refs\/tags\//} >> $GITHUB_OUTPUT
- uses: actions/setup-node@v3
with:
# This expects you to have a script called release which does a build for your packages and calls changeset publish
publish: pnpm release
node-version: "18.x"
registry-url: "https://registry.npmjs.org"
- name: npm build
run: deno run -A npm ${{steps.get_tag_version.outputs.TAG_VERSION}}
- name: npm publish
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
# - name: Send a Slack notification if a publish happens
# if: steps.changesets.outputs.published == 'true'
# # You can do something when a publish happens.
# run: my-slack-bot send-notification --message "A new version of ${GITHUB_REPOSITORY} was published!"
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: cd npm && npm publish