-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7192c18
commit 63ee1f8
Showing
1 changed file
with
28 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,59 @@ | ||
name: Build and Test | ||
name: CI | ||
on: | ||
push: | ||
branches: | ||
- master | ||
jobs: | ||
build-deploy: | ||
runs-on: ubuntu-18.04 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 14 | ||
node-version: 16 | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- run: npm install | ||
- run: npm run build | ||
- run: npm run test | ||
|
||
- name: Create idoc config | ||
run: | | ||
cat > idoc.yml << EOF | ||
site: "babel-plugin-transform-remove-imports {{version}}" | ||
menus: | ||
Home: index.html | ||
EOF | ||
- run: npm install [email protected] -g | ||
|
||
- run: npm i markdown-to-html-cli coverage-badges-cli -g | ||
- run: markdown-to-html-cli --output coverage/index.html | ||
- run: coverage-badges | ||
- run: coverage-badges --output dist/badges.svg | ||
|
||
- name: Generate Contributors Images | ||
uses: jaywcjlove/github-action-contributors@main | ||
with: | ||
filter-author: (renovate\[bot\]|renovate-bot|dependabot\[bot\]) | ||
output: coverage/CONTRIBUTORS.svg | ||
output: dist/CONTRIBUTORS.svg | ||
avatarSize: 42 | ||
|
||
- run: cp -rp coverage/lcov-report dist | ||
|
||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./coverage | ||
publish_dir: ./dist | ||
|
||
- name: Create Tag | ||
id: create_tag | ||
uses: jaywcjlove/create-tag-action@v1.3.5 | ||
uses: jaywcjlove/create-tag-action@main | ||
with: | ||
package-path: ./package.json | ||
|
||
- name: Generate Changelog | ||
id: changelog | ||
uses: jaywcjlove/changelog-generator@v1.4.8 | ||
uses: jaywcjlove/changelog-generator@main | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
head-ref: ${{steps.create_tag.outputs.version}} | ||
|
@@ -66,5 +78,8 @@ jobs: | |
${{ steps.changelog.outputs.changelog }} | ||
- run: npm install @jsdevtools/npm-publish -g | ||
- run: npm-publish --token="${{ secrets.NPM_TOKEN }}" ./package.json | ||
- run: npm publish --access public | ||
continue-on-error: true | ||
working-directory: core | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |