mirror of
https://github.com/TextPlace/CoreTextPlace.git
synced 2025-05-01 05:01:11 +00:00
chore: publish on both jsr & npm (0.1.2)
This commit is contained in:
parent
1bff47e2a3
commit
182314c0f6
3 changed files with 31 additions and 2 deletions
27
.github/workflows/publish_npm.yml
vendored
Normal file
27
.github/workflows/publish_npm.yml
vendored
Normal file
|
@ -0,0 +1,27 @@
|
|||
name: Publish Package to npmjs
|
||||
on:
|
||||
release:
|
||||
types: [created]
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: "18.x"
|
||||
registry-url: "https://registry.npmjs.org"
|
||||
- name: Setup Deno
|
||||
# uses: denoland/setup-deno@v1
|
||||
uses: denoland/setup-deno@61fe2df320078202e33d7d5ad347e7dcfa0e8f31 # v1.1.2
|
||||
with:
|
||||
deno-version: v1.x
|
||||
- run: deno run -A scripts/build_npm.ts
|
||||
- run: npm install -g npm
|
||||
- run: cd npm && npm ci
|
||||
- run: cd npm && npm publish --provenance --access public
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@textplace/core",
|
||||
"version": "0.1.1",
|
||||
"version": "0.1.2",
|
||||
"exports": "./mod.ts",
|
||||
"imports": {
|
||||
"@deno/dnt": "jsr:@deno/dnt@^0.41.1"
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
import { build, emptyDir } from "@deno/dnt";
|
||||
|
||||
import denoJson from "../deno.json" with { type: "json" };
|
||||
|
||||
await emptyDir("./npm");
|
||||
|
||||
await build({
|
||||
|
@ -12,7 +14,7 @@ await build({
|
|||
package: {
|
||||
// package.json properties
|
||||
name: "@textplace/core",
|
||||
version: Deno.args[0],
|
||||
version: denoJson.version,
|
||||
description: "The core logic of TextPlace.",
|
||||
license: "MIT",
|
||||
repository: {
|
||||
|
|
Loading…
Add table
Reference in a new issue