Skip to content

Adds semantic release #190

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

Merged
merged 2 commits into from
Jul 20, 2021
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
52 changes: 0 additions & 52 deletions .github/workflows/main.yml

This file was deleted.

39 changes: 32 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
name: release

name: build

on:
release:
types: [created]
push:
branches:
- main
- beta

jobs:
release:
name: Build and publish
build:
name: Full CI
runs-on: ubuntu-latest

steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Set up Node
uses: actions/setup-node@v1
Expand All @@ -29,10 +35,29 @@ jobs:
if: ${{ env.ACT }}
run: npm install

- name: Publish Package
run: npm publish --access=public
- name: Lint
run: npm run lint

- name: Test
run: npm test -- --ci --coverage --maxWorkers=2

- name: Build
run: npm run build

- name: Build Storybook
run: npm run build-storybook -- --quiet

- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_CLOUD_TOKEN }}

- name: Release
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release

- name: Publish Docs
run: npm run deploy-storybook -- --ci
Expand Down
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install commitlint --edit ""
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=commitd_components&metric=coverage&token=aa002ca75e2f3a6d028af9074bceeda1ffa2f9f7)](https://sonarcloud.io/dashboard?id=commitd_components)
![GitHub repo size](https://img.shields.io/github/repo-size/commitd/components)
[![Storybook](https://cdn.jsdelivr.net/gh/storybookjs/brand@master/badge/badge-storybook.svg)](https://committed.software/components)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)

For documentation see https://committed.software/components

Expand Down
Loading