-
-
Notifications
You must be signed in to change notification settings - Fork 2
63 lines (51 loc) · 1.39 KB
/
npm-publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# This workflow will install Deno then run `deno lint` and `deno test`.
# For more information see: https://github.com/denoland/setup-deno
name: Publish to NPM
on:
release:
types: [created]
workflow_dispatch:
inputs:
npm_version:
description: "Version number to publish on NPM X.Y.Z"
required: true
permissions:
contents: read
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Setup repo
uses: actions/checkout@v4
- name: Setup Deno
uses: denoland/setup-deno@v2
with:
deno-version: v2.x
- name: Node setup
uses: actions/setup-node@v4.0.1
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- name: Run linter
run: deno lint
- name: Run tests
run: deno test -A
- name: show deno version
run: deno --version
- name: Build Node JS code with dnt
run: deno run -A _build_npm.ts ${{inputs.npm_version}}
env:
PKG_VERSION: ${{inputs.npm_version}}
- name: refresh the project
run: |
npm install -g npm-check-updates
cd npm
npm-check-updates -u
npm install
npm run test
- name: Publish to npmjs.com
run: |
cd npm
npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}