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: add ability to publish to npm #6

Merged
merged 3 commits into from
May 3, 2022
Merged
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
39 changes: 0 additions & 39 deletions .github/workflows/build-and-lint.yml

This file was deleted.

56 changes: 56 additions & 0 deletions .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Build and Publish

on:
push:
branches:
- main

jobs:
release-please:
runs-on: ubuntu-latest
outputs:
release-created: ${{ steps.release.outputs.release_created }}
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
release-type: node
extra-files: README.md

# Build and publish to NPM when a new version is released.
build-and-publish:
runs-on: ubuntu-latest
needs: release-please
if: needs.release-please.outputs.release-created
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'
- run: yarn install --frozen-lockfile
- run: yarn build:prod
- run: yarn publish --non-interactive
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

# Build and publish storybook when a new version is released.
storybook:
runs-on: ubuntu-latest
needs: release-please
if: needs.release-please.outputs.release-created
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'
- run: yarn install --frozen-lockfile
- name: Build storybook
run: yarn build:storybook
- name: Deploy storybook
uses: JamesIves/github-pages-deploy-action@v4.3.3
with:
branch: gh-pages
folder: storybook-static
clean: true
16 changes: 16 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Lint

on:
push

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- run: yarn install
- run: yarn lint

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# bricks
# Front UI Kit (WIP)
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "front-ui-kit",
"version": "0.1.0",
"name": "@frontapp/ui-kit",
"version": "0.0.1",
"main": "index.js",
"repository": "git@github.com:frontapp/front-ui-kit.git",
"homepage": "http://frontapp.github.io/front-ui-kit",
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -32,6 +32,7 @@
],
"exclude": [
"node_modules",
"dist"
"dist",
"src/stories/"
]
}