Compare commits

...
Author SHA1 Message Date
Ciaran McGhie 09bb6bfaf2 chore: use node v16.15.1 in all workflows 2023-02-21 12:58:26 +00:00
Ciaran McGhie e37a2917f8 chore: ensure dependencies are included in package.json output for other monorepo projects 2023-02-21 12:17:05 +00:00
Ciaran McGhie f5a1f2e8b8 chore: bump node version to 16.15.1 in nvmrc
this is so that packages built by this repo are consumable by the website project
2023-02-21 12:17:05 +00:00
Ciaran McGhie cd7a403ad4 feat: add publish-npm workflow
Adds a workflow to publish a specified package to npm. The package can
be chosen from a dropdown when running the workflow.
2023-02-21 12:16:05 +00:00
10 changed files with 58 additions and 7 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ jobs:
id: Node
uses: actions/setup-node@v2
with:
node-version: 16.14.0
node-version: 16.15.1
- name: Install root dependencies
run: yarn install
- name: Generate queries
+1 -1
View File
@@ -16,7 +16,7 @@ jobs:
id: Node
uses: actions/setup-node@v2
with:
node-version: 16.14.0
node-version: 16.15.1
- name: Install root dependencies
run: yarn install
- name: Check PR title
+1 -1
View File
@@ -19,7 +19,7 @@ jobs:
id: Node
uses: actions/setup-node@v2
with:
node-version: 16.14.0
node-version: 16.15.1
- name: Install root dependencies
run: yarn install
- name: Generate queries
+47
View File
@@ -0,0 +1,47 @@
name: Publish libs to npm
on:
workflow_dispatch:
inputs:
project:
description: 'Monorepo project to publish'
required: true
type: choice
options:
- ui-toolkit
- react-helpers
- tailwindcss-config
- types
jobs:
publish:
name: Build & Publish - Tag
runs-on: ubuntu-latest
permissions:
contents: 'read'
actions: 'read'
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: User Node.js 16
id: Node
uses: actions/setup-node@v3
with:
node-version: 16.15.1
- name: Restore node_modules from cache
uses: actions/cache@v3
with:
path: '**/node_modules'
key: node_modules-${{ hashFiles('**/yarn.lock') }}
- name: Install root dependencies
run: yarn install --frozen-lockfile
- name: Build project
run: yarn nx build ${{inputs.project}}
- name: Publish project to @vegaprotocol
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
package: dist/libs/${{inputs.project}}/package.json
access: public
+1 -1
View File
@@ -26,7 +26,7 @@ jobs:
id: Node
uses: actions/setup-node@v3
with:
node-version: 16.14.0
node-version: 16.15.1
- name: Restore node_modules from cache
uses: actions/cache@v3
with:
+1 -1
View File
@@ -1 +1 @@
16.14.0
16.15.1
+1
View File
@@ -8,6 +8,7 @@
"executor": "@nrwl/web:rollup",
"outputs": ["{options.outputPath}"],
"options": {
"buildableProjectDepsInPackageJsonType": "dependencies",
"outputPath": "dist/libs/react-helpers",
"tsConfig": "libs/react-helpers/tsconfig.lib.json",
"project": "libs/react-helpers/package.json",
+2 -1
View File
@@ -10,7 +10,8 @@
"outputPath": "dist/libs/tailwindcss-config",
"main": "libs/tailwindcss-config/src/index.js",
"tsConfig": "libs/tailwindcss-config/tsconfig.lib.json",
"assets": ["libs/tailwindcss-config/*.md"]
"assets": ["libs/tailwindcss-config/*.md"],
"buildableProjectDepsInPackageJsonType": "dependencies"
}
},
"lint": {
+2 -1
View File
@@ -21,7 +21,8 @@
"input": ".",
"output": "."
}
]
],
"buildableProjectDepsInPackageJsonType": "dependencies"
}
},
"lint": {
+1
View File
@@ -8,6 +8,7 @@
"executor": "@nrwl/web:rollup",
"outputs": ["{options.outputPath}"],
"options": {
"buildableProjectDepsInPackageJsonType": "dependencies",
"outputPath": "dist/libs/ui-toolkit",
"tsConfig": "libs/ui-toolkit/tsconfig.lib.json",
"project": "libs/ui-toolkit/package.json",