Create @matrix-org/spec npm package containing sas-emoji.json (#1620)

* Create packages/npm @matrix-org/spec npm package containing spec-emoji

* Initial workflow script

* Add newsfragment

* Add docs

* npm publish doesn't like symlinks, yarn does :((
pull/1623/head
Michael Telatynski 9 months ago committed by GitHub
parent 4abea9a6ca
commit c0babbfc13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,40 @@
name: Release packages
on:
release:
types: [published]
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
# Releases to npm after bumping the package.json version from 0.0.0 to $TAG.0 as the tags only contain MAJOR.MINOR
npm:
name: Publish to npm
runs-on: ubuntu-latest
if: github.event.release.prerelease == false
defaults:
run:
working-directory: packages/npm
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 --frozen-lockfile"
- name: 🎖 Bump package.json version
run: "yarn version $VERSION"
env:
VERSION: ${{ github.event.release.tag_name }}.0
- name: 🚀 Publish to npm
id: npm-publish
uses: JS-DevTools/npm-publish@5a85faf05d2ade2d5b6682bfe5359915d5159c6c # v2.2.1
with:
token: ${{ secrets.NPM_TOKEN }}
package: packages/npm
access: public
ignore-scripts: false

@ -52,6 +52,7 @@ Additionally, the following directories may be of interest:
* `/data-definitions`: Bits of structured data consumable by Matrix implementations.
* `/meta`: Documentation relating to the spec's processes that are otherwise untracked (release instructions, etc).
* `/scripts`: Various scripts for generating the spec and validating its contents.
* `/packages`: Various packages for shipping spec files like OpenAPI/swagger bindings and data definitions.
## Authoring changes to the spec

@ -0,0 +1 @@
Create @matrix-org/spec npm package to ship the SAS Emoji data definitions & translations.

@ -0,0 +1,2 @@
node_modules
sas-emoji.json

@ -0,0 +1,13 @@
{
"name": "@matrix-org/spec",
"version": "0.0.0",
"description": "Data definitions for the Matrix Spec",
"author": "matrix.org",
"license": "Apache-2.0",
"files": [
"sas-emoji.json"
],
"scripts": {
"prepare": "cp ../../data-definitions/sas-emoji.json ."
}
}

@ -0,0 +1,4 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
Loading…
Cancel
Save