-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (39 loc) · 1.12 KB
/
CD.yml
File metadata and controls
47 lines (39 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: CD
on:
# Triggers the workflow when new releases are created
release:
types: [published]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
- uses: actions/setup-node@v2
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- name: Setup
run: yarn install
- name: Format
run: npm run format
- name: Fix
run: npm run lint-fix
- name: Auto committing styled files
uses: stefanzweifel/git-auto-commit-action@v4
with:
repository: 'src/'
commit_message: "Github Action: Auto styled JS files"
branch: ${{ github.ref }}
add_options: '-f'
- name: Auto Minify
uses: nizarmah/auto-minify@v2.0
with:
directory: 'src'
output: 'dist'
js_engine: uglify-js
- name: Publish
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.PACKAGES_TOKEN}}