Skip to content
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
102 changes: 102 additions & 0 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# CI/CD Release Workflow
name: pipeline

on:
pull_request:
branches:
- 'release-*'
- 'master'
tags-ignore:
- '*'
env:
CI: ''
COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
PULL_NUMBER: ${{ github.event.pull_request.number }}
RUN_ID: ${{ github.run_id }}
FORCE_COLOR: 2

jobs:
pipeline:
name: Node ${{ matrix.node-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
node-version: ['16.x']
os: ['ubuntu-latest']

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- name: Install project
run: yarn --prefer-offline
id: install

- name: Build project
run: yarn run build
id: production

- name: Pack project
run: npm pack
id: pack

- name: Set output info
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"

- name: Create automatic release
uses: 'marvinpinto/action-automatic-releases@latest'
if: ${{ github.event_name == 'push'}}
with:
repo_token: '${{ secrets.GITHUB_TOKEN }}'
automatic_release_tag: 'latest'
prerelease: true
files: |
LICENSE.md
**.tgz
id: 'automatic_releases'


release:
# if: startsWith(github.ref, 'refs/tags/')

if: ${{ github.event_name == 'create' && github.event.ref_type == 'tag' }}

runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- run: echo "Deploying tag ${{ github.ref }}" ;
- name: "Build Changelog"
id: github_release
uses: mikepenz/release-changelog-builder-action@v3
with:
configuration: ".github/workflows/release.json"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create Release
uses: actions/create-release@v3
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body: ${{steps.github_release.outputs.changelog}}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36 changes: 36 additions & 0 deletions .github/workflows/release.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"categories": [
{
"title": "## 🟢 Features",
"labels": ["feature", "feat", "release"]
},
{
"title": "## 🟠 Fixes",
"labels": ["fix", "bug", "refactor"]
},
{
"title": "## 🟡 CI/CD",
"labels": ["test", "ci", "cd"]
},
{
"title": "## 🔵 Docs",
"labels": ["docs"]
}
],
"sort": "ASC",
"template": "${{CHANGELOG}}\n\n<details>\n<summary>Uncategorized</summary>\n\n${{UNCATEGORIZED}}\n</details>",
"pr_template": "- ${{TITLE}}\n - PR: #${{NUMBER}}",
"empty_template": "- no changes",
"transformers": [
{
"pattern": "[\\-\\*] (\\[(...|TEST|CI|SKIP)\\])( )?(.+?)\n(.+?[\\-\\*] )(.+)",
"target": "- $4\n - $6"
}
],
"max_tags_to_fetch": 200,
"max_pull_requests": 200,
"max_back_track_time_days": 90,
"exclude_merge_branches": [
"Owner/qa"
]
}
12 changes: 12 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# -*- mode: gitignore; -*-
/out
cache/
*.html
*.css
*.svg
*.xml
*.scss
*.min.js
.cache/
build/
dist/
17 changes: 17 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
'use strict';

module.exports = {
arrowParens: 'always',
bracketSpacing: true,
endOfLine: 'lf',
jsxBracketSameLine: false,
jsxSingleQuote: false,
printWidth: 100,
proseWrap: 'always',
quoteProps: 'as-needed',
semi: true,
singleQuote: true,
tabWidth: 2,
trailingComma: 'all',
useTabs: false,
};
Loading