2023-02-22 12:11:35 +00:00
|
|
|
name: Publish libs to npm
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
inputs:
|
|
|
|
project:
|
|
|
|
description: 'Monorepo project to publish'
|
|
|
|
required: true
|
|
|
|
type: choice
|
|
|
|
options:
|
2023-03-29 13:20:49 +00:00
|
|
|
- announcements
|
2023-02-22 12:11:35 +00:00
|
|
|
- ui-toolkit
|
|
|
|
- react-helpers
|
|
|
|
- tailwindcss-config
|
|
|
|
- types
|
2023-03-01 16:35:49 +00:00
|
|
|
- utils
|
|
|
|
- i18n
|
2023-08-31 02:40:04 +00:00
|
|
|
- wallet
|
2023-02-22 12:11:35 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
publish:
|
|
|
|
name: Build & Publish - Tag
|
2023-04-03 13:53:50 +00:00
|
|
|
runs-on: ubuntu-22.04
|
2023-02-22 12:11:35 +00:00
|
|
|
permissions:
|
|
|
|
contents: 'read'
|
|
|
|
actions: 'read'
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v3
|
2023-04-03 13:53:50 +00:00
|
|
|
|
|
|
|
- name: Setup node
|
2023-02-22 12:11:35 +00:00
|
|
|
uses: actions/setup-node@v3
|
|
|
|
with:
|
2023-04-03 13:53:50 +00:00
|
|
|
node-version-file: '.nvmrc'
|
|
|
|
# https://stackoverflow.com/questions/61010294/how-to-cache-yarn-packages-in-github-actions
|
|
|
|
cache: yarn
|
|
|
|
|
2023-02-22 12:11:35 +00:00
|
|
|
- name: Install root dependencies
|
|
|
|
run: yarn install --frozen-lockfile
|
2023-04-03 13:53:50 +00:00
|
|
|
|
2023-02-22 12:11:35 +00:00
|
|
|
- name: Build project
|
|
|
|
run: yarn nx build ${{inputs.project}}
|
2023-04-03 13:53:50 +00:00
|
|
|
|
2023-02-22 12:11:35 +00:00
|
|
|
- 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
|