Skip to content
This repository has been archived by the owner on Apr 30, 2024. It is now read-only.

Restore publishing scripts for continuous delivery #966

Merged
merged 18 commits into from
Oct 13, 2021
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/workflows/cd-fonts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
deploy_npm:
defaults:
run:
working-directory: "packages/fonts"
working-directory: "/"
name: Deploy to npm
runs-on: ubuntu-latest
steps:
Expand All @@ -28,9 +28,14 @@ jobs:
run: npm install --no-audit

- name: Publish package
run: bash deploy.sh
run: bash scripts/build_fonts.sh
MuluhGodson marked this conversation as resolved.
Show resolved Hide resolved
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

-name: Deploy
run: bash publish/fonts.sh
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v1
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/cd-vocabulary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
deploy_npm:
defaults:
run:
working-directory: "packages/vocabulary"
working-directory: "/"
name: Deploy to npm
runs-on: ubuntu-latest
steps:
Expand All @@ -28,9 +28,14 @@ jobs:
run: npm install --no-audit

- name: Publish package
run: bash deploy.sh
run: bash scripts/build_vocabulary.sh
MuluhGodson marked this conversation as resolved.
Show resolved Hide resolved
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

-name: Deploy
run: bash publish/vocabulary.sh
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v1
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/cd-vue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
deploy_npm:
defaults:
run:
working-directory: "packages/vue-vocabulary"
working-directory: "/"
name: Deploy to npm
runs-on: ubuntu-latest
steps:
Expand All @@ -27,6 +27,11 @@ jobs:
run: npm install --no-audit

- name: Publish package
run: bash deploy.sh
run: bash scripts/build_vue_vocabulary.sh
MuluhGodson marked this conversation as resolved.
Show resolved Hide resolved
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

-name: Deploy
run: bash publish/vue-vocabulary.sh
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
41 changes: 6 additions & 35 deletions .github/workflows/ci-fonts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ name: CI for fonts package
on:
MuluhGodson marked this conversation as resolved.
Show resolved Hide resolved
push:
paths:
- "packages/fonts/**"
- "scripts/**"
branches:
- main
pull_request:
paths:
- "packages/fonts/**"
- "scripts/**"
branches:
- main

Expand All @@ -21,7 +21,7 @@ jobs:
name: Setup
defaults:
run:
working-directory: "packages/fonts"
working-directory: "/"
runs-on: ubuntu-latest

steps:
Expand All @@ -46,7 +46,7 @@ jobs:
name: Lint
defaults:
run:
working-directory: "packages/fonts"
working-directory: "/"
runs-on: ubuntu-latest
needs: setup

Expand All @@ -71,40 +71,11 @@ jobs:
- name: Run lint
run: npm run lint

unit:
name: Unit tests
defaults:
run:
working-directory: "packages/fonts"
runs-on: ubuntu-latest
needs: setup

steps:
- uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: "12.16.1"

- id: cache-node-modules
name: Cache Node.js modules
uses: actions/cache@v1
with:
path: ~/.npm # npm caches files in ~/.npm
key: node-${{ hashFiles('**/package-lock.json') }}

- name: Install dependencies
run: npm install --prefer-offline --no-audit

- name: Run tests
run: npm run test:unit

MuluhGodson marked this conversation as resolved.
Show resolved Hide resolved
build:
name: Build
defaults:
run:
working-directory: "packages/fonts"
working-directory: "/"
runs-on: ubuntu-latest
needs: setup

Expand All @@ -127,4 +98,4 @@ jobs:
run: npm install --prefer-offline --no-audit

- name: Run build
run: npm run build
run: npm run build:fonts
41 changes: 6 additions & 35 deletions .github/workflows/ci-vocabulary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ name: CI for vocabulary package
on:
push:
paths:
- "packages/vocabulary/**"
- "scripts/**"
branches:
- main
pull_request:
paths:
- "packages/vocabulary/**"
- "scripts/**"
branches:
- main

Expand All @@ -21,7 +21,7 @@ jobs:
name: Setup
defaults:
run:
working-directory: "packages/vocabulary"
working-directory: "/"
runs-on: ubuntu-latest

steps:
Expand All @@ -47,7 +47,7 @@ jobs:
name: Lint
defaults:
run:
working-directory: "packages/vocabulary"
working-directory: "/"
runs-on: ubuntu-latest
needs: setup

Expand All @@ -72,40 +72,11 @@ jobs:
- name: Run lint
run: npm run lint

unit:
name: Unit tests
defaults:
run:
working-directory: "packages/vocabulary"
runs-on: ubuntu-latest
needs: setup

steps:
- uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: "12.16.1"

- id: cache-node-modules
name: Cache Node.js modules
uses: actions/cache@v1
with:
path: ~/.npm # npm caches files in ~/.npm
key: node-${{ hashFiles('**/package-lock.json') }}

- name: Install dependencies
run: npm install --prefer-offline --no-audit

- name: Run tests
run: npm run test:unit

MuluhGodson marked this conversation as resolved.
Show resolved Hide resolved
build:
name: Build
defaults:
run:
working-directory: "packages/vocabulary"
working-directory: "/"
runs-on: ubuntu-latest
needs: setup

Expand Down Expand Up @@ -135,4 +106,4 @@ jobs:
run: npm install --prefer-offline --no-audit

- name: Run build
run: npm run build
run: npm run build:vocabulary
41 changes: 6 additions & 35 deletions .github/workflows/ci-vue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ name: CI for vue package
on:
MuluhGodson marked this conversation as resolved.
Show resolved Hide resolved
push:
paths:
- "packages/vue-vocabulary/**"
- "scripts/**"
branches:
- main
pull_request:
paths:
- "packages/vue-vocabulary/**"
- "scripts/**"
branches:
- main

Expand All @@ -21,7 +21,7 @@ jobs:
name: Setup
defaults:
run:
working-directory: "packages/vue-vocabulary"
working-directory: "/"
runs-on: ubuntu-latest

steps:
Expand All @@ -46,7 +46,7 @@ jobs:
name: Lint
defaults:
run:
working-directory: "packages/vue-vocabulary"
working-directory: "/"
runs-on: ubuntu-latest
needs: setup

Expand All @@ -71,40 +71,11 @@ jobs:
- name: Run lint
run: npm run lint

unit:
name: Unit tests
defaults:
run:
working-directory: "packages/vue-vocabulary"
runs-on: ubuntu-latest
needs: setup

steps:
- uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: "12.16.1"

- id: cache-node-modules
name: Cache Node.js modules
uses: actions/cache@v1
with:
path: ~/.npm # npm caches files in ~/.npm
key: node-${{ hashFiles('**/package-lock.json') }}

- name: Install dependencies
run: npm install --prefer-offline --no-audit

- name: Run tests
run: npm run test:unit

build:
name: Build
defaults:
run:
working-directory: "packages/vue-vocabulary"
working-directory: "/"
runs-on: ubuntu-latest
needs: setup

Expand All @@ -127,4 +98,4 @@ jobs:
run: npm install --prefer-offline --no-audit

- name: Run build
run: npm run build
run: npm run build:vue-vocabulary
20 changes: 20 additions & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash
MuluhGodson marked this conversation as resolved.
Show resolved Hide resolved
MuluhGodson marked this conversation as resolved.
Show resolved Hide resolved

set -o errexit
set -o errtrace
set -o nounset

trap '_es=${?};
_lo=${LINENO};
_co=${BASH_COMMAND};
echo "${0}: line ${_lo}: \"${_co}\" exited with a status of ${_es}";
exit ${_es}' ERR

npm run build:storybook
cp package.json dist/
cp README.md dist/
sed -i -e 's/say, fonts/here, vue-vocabulary/' -e 's/cd packages\/fonts/cd packages\/vue-vocabulary/' dist/README.md
MuluhGodson marked this conversation as resolved.
Show resolved Hide resolved
cp LICENSE dist/

cd dist
npm publish --access public
20 changes: 20 additions & 0 deletions publish.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash
MuluhGodson marked this conversation as resolved.
Show resolved Hide resolved
MuluhGodson marked this conversation as resolved.
Show resolved Hide resolved

set -o errexit
set -o errtrace
set -o nounset

trap '_es=${?};
_lo=${LINENO};
_co=${BASH_COMMAND};
echo "${0}: line ${_lo}: \"${_co}\" exited with a status of ${_es}";
exit ${_es}' ERR

npm run build:storybook
cp package.json dist/
cp README.md dist/
sed -i -e 's/say, fonts/here, vue-vocabulary/' -e 's/cd packages\/fonts/cd packages\/vue-vocabulary/' dist/README.md
cp LICENSE dist/

cd dist
npm publish --access public
20 changes: 20 additions & 0 deletions publish/fonts.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

set -o errexit
set -o errtrace
set -o nounset

trap '_es=${?};
_lo=${LINENO};
_co=${BASH_COMMAND};
echo "${0}: line ${_lo}: \"${_co}\" exited with a status of ${_es}";
exit ${_es}' ERR

npm run build:storybook
cp package.json dist/
cp README.md dist/
sed -i -e 's/say, fonts/here, fonts/' dist/README.md
cp LICENSE dist/

cd dist
npm publish --access public
MuluhGodson marked this conversation as resolved.
Show resolved Hide resolved
Loading