generated from Blackprint/template-js
-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (44 loc) · 1.53 KB
/
dependency.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
# Bundle the dependency so we can easily load from CDN
# https://github.com/gram-js/gramjs (MIT Licensed)
name: Bundle Dependency
on:
workflow_dispatch:
inputs:
dryRun:
description: 'View list of files that will be published before the real release'
required: true
default: 'true' ## Dry run
release:
# This specifies that the build will be triggered when we publish a release
types: [published]
jobs:
build:
name: Bundle Dependency
runs-on: ubuntu-latest
timeout-minutes: 5 # Usually this will be finish under 5 minutes
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- name: ⚙ Update submodules
run: git submodule update --init --recursive --remote
- name: ⚙ Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org/
- name: 🛠 Installing dependency
run: npm run npm-install-gramjs
- name: 🛠 Bundling Modules
run: npm run build-gramjs
- run: mkdir ./dist
- run: mv ./gramjs/browser/ ./dist/browser/
- name: 📦 Dry Run
if: github.event.inputs.dryRun == 'true'
run: npm publish --dry-run
# If you want to publish to NPM, make sure to put your NPM token to repository settings
- name: 📦 Publish Packages
if: github.event.inputs.dryRun != 'true'
run: npm publish --access=public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}