Skip to content

Commit

Permalink
chore: Add github workflow (#17)
Browse files Browse the repository at this point in the history
* chore: Add github workflow

* chore: Add semantic-release to github actions

* chore: Change workflow name

* chore: Add semantic-release dry-run option

* chore: CHange push policy

* chore: Change policy

* chore: Add permistion to node_modules dir

* chore: Remove upload node_modules

* chore: Add @semantic-release plugins

* chore: Add conventional-commit dep

* chore: Add release.config.js

* chore: Add restore cache

* chore: Update release branch
  • Loading branch information
Jungwoo-An authored Mar 22, 2020
1 parent bb7542e commit 8fa2f1a
Show file tree
Hide file tree
Showing 4 changed files with 2,967 additions and 69 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: release

on: [push]

jobs:
install:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12
- uses: actions/cache@v1
with:
path: node_modules
key: react-editor-js-${{ hashFiles('**/yarn.lock') }}
- run: npm install -g yarn
- run: yarn
- run: chmod -R +x ./node_modules/.bin

build:
needs: install
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12
- uses: actions/cache@v1
with:
path: node_modules
key: react-editor-js-${{ hashFiles('**/yarn.lock') }}
- run: yarn build
- uses: actions/upload-artifact@v1
with:
name: dist
path: dist

publish:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12
- uses: actions/cache@v1
with:
path: node_modules
key: react-editor-js-${{ hashFiles('**/yarn.lock') }}
- uses: actions/download-artifact@v1
with:
name: dist
- run: npx semantic-release --extends
env:
GITHUB_TOKEN: ${{secrets.GITHUB_ACCESS_TOKEN}}
NPM_TOKEN: ${{secrets.NPM_ACCESS_TOKEN}}
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@
"@editorjs/simple-image": "^1.3.3",
"@editorjs/table": "^1.2.0",
"@editorjs/warning": "^1.1.0",
"@semantic-release/commit-analyzer": "^8.0.1",
"@semantic-release/github": "^7.0.5",
"@semantic-release/npm": "^7.0.5",
"@semantic-release/release-notes-generator": "^9.0.1",
"@storybook/addon-actions": "^5.2.8",
"@storybook/addon-links": "^5.2.8",
"@storybook/addons": "^5.2.8",
Expand All @@ -53,6 +57,7 @@
"@typescript-eslint/eslint-plugin": "^2.10.0",
"@typescript-eslint/parser": "^2.10.0",
"babel-loader": "^8.0.5",
"conventional-changelog-conventionalcommits": "^4.2.3",
"eslint": "^6.7.2",
"eslint-config-standard": "^14.1.0",
"eslint-plugin-import": "^2.19.1",
Expand Down
20 changes: 20 additions & 0 deletions release.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
module.exports = {
branches: ['master'],
tagFormat: '${version}',
plugins: [
[
'@semantic-release/commit-analyzer',
{
preset: 'conventionalcommits'
}
],
[
'@semantic-release/release-notes-generator',
{
preset: 'conventionalcommits'
}
],
'@semantic-release/npm',
'@semantic-release/github'
]
}
Loading

0 comments on commit 8fa2f1a

Please sign in to comment.