Skip to content

Commit

Permalink
Merge pull request #14 from elementsinteractive/feature/release-deplo…
Browse files Browse the repository at this point in the history
…yment

ci: set-up release deployment with github actions
  • Loading branch information
jeffreydelooff authored Jun 30, 2022
2 parents f108ee9 + e8d2c14 commit a2bf2c7
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 8 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Publish Package to npmjs

on:
push:
branches: [main]

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
31 changes: 30 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
[![npm version](https://badge.fury.io/js/@makerstreet%2Fdesign-tokens.svg)](https://badge.fury.io/js/@makerstreet%2Fdesign-tokens)

# Elements Design Tokens

> Design System code generation for Elements projects with Figma Tokens and Style Dictionary
# Goal of this library
## Contents

- [Goal of this library](#goal-of-this-library)
- [Supported platforms](#supported-platforms)
- [Installation](#installation)
- [CLI Usage](#cli-Usage)

## Goal of this library

At Elements we use Figma to create our designs. By using the [Figma Tokens](https://www.figmatokens.com/) plugin we define design tokens by with all the values needed to construct and maintain a design system for a project.

Expand All @@ -12,6 +21,26 @@ With this library you can generate the theme code for a specific platform.

- Android with Compose UI

## Installation

You can install it globally:

```bash
$ npm install -g @makerstreet/design-tokens
```

Or as a dev dependency:

```bash
$ npm install -D @makerstreet/design-tokens
```

If you use yarn:

```bash
$ yarn add @makerstreet/design-tokens --dev
```

## CLI Usage

```bash
Expand Down
27 changes: 20 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,14 @@
"commitmsg": "validate-commit-msg",
"build": "tsc && yarn copy-files",
"test": "jest",
"predocs": "rm -rf docs/",
"docs": "esdoc -c .esdoc.json",
"prepack": "npm run build",
"prepublish": "npm run build",
"semantic-release": "semantic-release pre && npm run publish && semantic-release post",
"prepublish": "yarn build",
"prettier": "prettier",
"prettier-write": "yarn prettier -- --parser typescript --no-semi --trailing-comma all --write --print-width 120",
"prettier-project": "yarn prettier-write -- 'lib/**/*.{ts,tsx}'",
"lint": "eslint \"lib/**/*.ts\"",
"local": "sudo npm i -g && elements-design-tokens",
"copy-files": "copyfiles -u 1 src/**/*.ejs dist/"
"copy-files": "copyfiles -u 1 src/**/*.ejs dist/",
"semantic-release": "semantic-release"
},
"license": "MIT",
"engines": {
Expand Down Expand Up @@ -98,5 +95,21 @@
"\\.snap$",
"<rootDir>/node_modules/"
]
}
},
"release":{
"branches": [
"+([0-9])?(.{+([0-9]),x}).x",
"main",
"next",
"next-major",
{
"name": "beta",
"prerelease": true
},
{
"name": "alpha",
"prerelease": true
}
]
}
}

0 comments on commit a2bf2c7

Please sign in to comment.