Skip to content

Commit

Permalink
Add publish actions (deephaven#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattrunyon authored Apr 17, 2023
1 parent 44217ca commit 0813bb1
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 4 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/publish-alpha.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Publish Alpha
on:
workflow_dispatch:
inputs:
preid:
description: 'Preid used to publish package. Must be unique per branch.'
required: true
default: 'alpha'
ref:
description: 'Commit to deploy from. Defaults to branch used for workflow_dispatch action.'
required: false
default: ''
jobs:
publish-alpha:
runs-on: ubuntu-22.04
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
with:
fetch-depth: '0' # Need the history to properly select the canary version number
ref: ${{ github.event.inputs.ref }}
- uses: actions/setup-node@v3
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: npm ci
- name: Build packages
run: npm run build
- run: ./node_modules/.bin/lerna publish --canary --preid ${{ github.event.inputs.preid }} --dist-tag canary --yes
env:
NODE_AUTH_TOKEN: ${{ secrets.DEEPHAVENBOT_NPM_TOKEN }}
29 changes: 29 additions & 0 deletions .github/workflows/publish-packages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Publish Packages
on:
workflow_dispatch:
release:
types: [created]
jobs:
publish-packages:
runs-on: ubuntu-22.04
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: npm ci
- name: Build production
run: npm run build
- name: Publish packages
run: ./node_modules/.bin/lerna publish from-package --yes
env:
NODE_AUTH_TOKEN: ${{ secrets.DEEPHAVENBOT_NPM_TOKEN }}
2 changes: 1 addition & 1 deletion plugins/dashboard-object-viewer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"license": "Apache-2.0",
"main": "dist/index.js",
"files": [
"dist"
"dist/index.js"
],
"scripts": {
"start": "vite build --watch",
Expand Down
2 changes: 1 addition & 1 deletion plugins/matplotlib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@
"access": "public"
},
"files": [
"dist"
"dist/index.js"
]
}
2 changes: 1 addition & 1 deletion plugins/plotly/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@
"access": "public"
},
"files": [
"dist"
"dist/index.js"
]
}
2 changes: 1 addition & 1 deletion plugins/table-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"license": "Apache-2.0",
"main": "dist/index.js",
"files": [
"dist"
"dist/index.js"
],
"scripts": {
"start": "vite build --watch",
Expand Down

0 comments on commit 0813bb1

Please sign in to comment.