Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: set-up release deployment with github actions #14

Merged
merged 5 commits into from
Jun 30, 2022
Merged
Show file tree
Hide file tree
Changes from all 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
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
}
]
}
}
34 changes: 0 additions & 34 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1189,14 +1189,6 @@
"@typescript-eslint/typescript-estree" "5.29.0"
debug "^4.3.4"

"@typescript-eslint/scope-manager@5.27.1":
version "5.27.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.27.1.tgz#4d1504392d01fe5f76f4a5825991ec78b7b7894d"
integrity sha512-fQEOSa/QroWE6fAEg+bJxtRZJTH8NTskggybogHt4H9Da8zd4cJji76gA5SBlR0MgtwF7rebxTbDKB49YUCpAg==
dependencies:
"@typescript-eslint/types" "5.27.1"
"@typescript-eslint/visitor-keys" "5.27.1"

"@typescript-eslint/scope-manager@5.29.0":
version "5.29.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.29.0.tgz#2a6a32e3416cb133e9af8dcf54bf077a916aeed3"
Expand All @@ -1214,29 +1206,11 @@
debug "^4.3.4"
tsutils "^3.21.0"

"@typescript-eslint/types@5.27.1":
version "5.27.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.27.1.tgz#34e3e629501349d38be6ae97841298c03a6ffbf1"
integrity sha512-LgogNVkBhCTZU/m8XgEYIWICD6m4dmEDbKXESCbqOXfKZxRKeqpiJXQIErv66sdopRKZPo5l32ymNqibYEH/xg==

"@typescript-eslint/types@5.29.0":
version "5.29.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.29.0.tgz#7861d3d288c031703b2d97bc113696b4d8c19aab"
integrity sha512-X99VbqvAXOMdVyfFmksMy3u8p8yoRGITgU1joBJPzeYa0rhdf5ok9S56/itRoUSh99fiDoMtarSIJXo7H/SnOg==

"@typescript-eslint/typescript-estree@5.27.1":
version "5.27.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.27.1.tgz#7621ee78607331821c16fffc21fc7a452d7bc808"
integrity sha512-DnZvvq3TAJ5ke+hk0LklvxwYsnXpRdqUY5gaVS0D4raKtbznPz71UJGnPTHEFo0GDxqLOLdMkkmVZjSpET1hFw==
dependencies:
"@typescript-eslint/types" "5.27.1"
"@typescript-eslint/visitor-keys" "5.27.1"
debug "^4.3.4"
globby "^11.1.0"
is-glob "^4.0.3"
semver "^7.3.7"
tsutils "^3.21.0"

"@typescript-eslint/typescript-estree@5.29.0":
version "5.29.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.29.0.tgz#e83d19aa7fd2e74616aab2f25dfbe4de4f0b5577"
Expand All @@ -1262,14 +1236,6 @@
eslint-scope "^5.1.1"
eslint-utils "^3.0.0"

"@typescript-eslint/visitor-keys@5.27.1":
version "5.27.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.27.1.tgz#05a62666f2a89769dac2e6baa48f74e8472983af"
integrity sha512-xYs6ffo01nhdJgPieyk7HAOpjhTsx7r/oB9LWEhwAXgwn33tkr+W8DI2ChboqhZlC4q3TC6geDYPoiX8ROqyOQ==
dependencies:
"@typescript-eslint/types" "5.27.1"
eslint-visitor-keys "^3.3.0"

"@typescript-eslint/visitor-keys@5.29.0":
version "5.29.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.29.0.tgz#7a4749fa7ef5160c44a451bf060ac1dc6dfb77ee"
Expand Down