mirror of
https://github.com/classchartsapi/classcharts-api-js.git
synced 2026-05-14 03:56:59 +00:00
feat: denoify (#33)
This commit is contained in:
parent
f2981dd167
commit
f86ded2ae3
31 changed files with 331 additions and 4940 deletions
40
.github/workflows/release.yml
vendored
40
.github/workflows/release.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue