mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-22 19:14:52 +01:00
Merge pull request #1084 from vector-im/sdk-release-action
Add workflow file for publishing sdk package
This commit is contained in:
commit
d47fcc6dca
46
.github/workflows/sdk-release.js.yml
vendored
Normal file
46
.github/workflows/sdk-release.js.yml
vendored
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
# Must only be called from `release#published` triggers
|
||||||
|
name: Publish to npm
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- sdk-v**
|
||||||
|
jobs:
|
||||||
|
npm:
|
||||||
|
name: Publish to npm
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: 🧮 Checkout code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- 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
|
Loading…
Reference in New Issue
Block a user