Skip to content

Commit

Permalink
feat: refactoring build tasks
Browse files Browse the repository at this point in the history
refactoring build tasks

BREAKING CHANGE: refactoring build tasks
  • Loading branch information
cycjimmy committed Mar 26, 2022
1 parent 4645894 commit 6469d23
Show file tree
Hide file tree
Showing 16 changed files with 1,448 additions and 109 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
dist/*
coverage/*
.release/*
6 changes: 5 additions & 1 deletion .github/workflows/nodeTestCI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
branches:
- master
- main
- next
- next-major
- alpha
- beta

schedule:
- cron: 0 2 * * 0
Expand All @@ -25,7 +29,7 @@ jobs:
node-version: ${{ matrix.node }}
- run: npm ci
- run: npm test
- run: npm run build
- run: npm run package

- name: Semantic Release Test
uses: cycjimmy/semantic-release-action@v3
Expand Down
14 changes: 11 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
branches:
- master
- main
- next
- next-major
- alpha
- beta

jobs:
test:
Expand All @@ -22,8 +26,8 @@ jobs:
- name: Install dependencies
run: npm ci

- name: Test
run: npm run test
- run: npm run test
- run: npm run package

release:
name: release
Expand All @@ -41,12 +45,16 @@ jobs:
- name: Install dependencies
run: npm ci

- name: Build package
run: npm run package

- name: Semantic Release
uses: cycjimmy/semantic-release-action@v3
id: semantic
with:
branches: |
[
'+([0-9])?(.{+([0-9]),x}).x',
'master',
'main',
'next',
Expand Down Expand Up @@ -77,7 +85,7 @@ jobs:

- name: Publish To GitHub Package Registry
if: steps.semantic.outputs.new_release_published == 'true'
run: npm publish
run: npm publish ./.release
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,5 @@ node_modules/
.publish/
dist/
temp/
coverage

coverage/
.release/
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ canvasSnow.start();

To use via a CDN include this in your HTML:
```text
<script src="https://cdn.jsdelivr.net/npm/@cycjimmy/canvas-snow@2/dist/canvas-snow.umd.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@cycjimmy/canvas-snow@3/dist/canvas-snow.umd.min.js"></script>
```

<!-- Links: -->
Expand Down
8 changes: 8 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,12 @@ export default {
},
setupFiles: ['jest-canvas-mock'],
testEnvironment: 'jsdom',
coverageThreshold: {
global: {
branches: 50,
functions: 50,
lines: 50,
statements: 50,
},
},
};

0 comments on commit 6469d23

Please sign in to comment.