mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
56 lines
1.4 KiB
YAML
56 lines
1.4 KiB
YAML
name: Publish to npm
|
|
on:
|
|
push:
|
|
tags:
|
|
- "sdk-v**"
|
|
jobs:
|
|
npm:
|
|
name: Publish to npm
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
matrix:
|
|
node-version: [18.1.0]
|
|
|
|
steps:
|
|
- name: 🧮 Checkout code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Install tools
|
|
uses: actions/setup-node@v2
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
- name: 🔧 Yarn cache
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
cache: "yarn"
|
|
registry-url: "https://registry.npmjs.org"
|
|
|
|
- name: 🔨 Install dependencies
|
|
run: "yarn install --prefer-offline --frozen-lockfile"
|
|
|
|
- name: Run Unit tests
|
|
run: "yarn test"
|
|
|
|
- name: Run Lint Checks
|
|
run: "yarn run lint-ci"
|
|
|
|
- name: Run Typescript Checks
|
|
run: "yarn run tsc"
|
|
|
|
- name: Run SDK tests
|
|
run: "yarn test:sdk"
|
|
|
|
- name: Build SDK
|
|
run: "yarn build:sdk"
|
|
|
|
- name: 🚀 Publish to npm
|
|
id: npm-publish
|
|
uses: JS-DevTools/npm-publish@v2
|
|
with:
|
|
token: ${{ secrets.NPM_TOKEN }}
|
|
access: public
|
|
package: ./target
|
|
dry-run: true
|