Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat/eslint9 #109

Merged
merged 9 commits into from
May 30, 2024
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
19 changes: 0 additions & 19 deletions .eslintignore

This file was deleted.

107 changes: 0 additions & 107 deletions .eslintrc.json

This file was deleted.

3 changes: 3 additions & 0 deletions .github/hooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ set -e

npm run lint

npm run snyk:test

output=$(npm run type-coverage)
if echo "$output" | grep -q "lower than "; then
echo "$output"
Expand All @@ -17,3 +19,4 @@ npm run test
npm run build

npm run build:lib

181 changes: 91 additions & 90 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -1,102 +1,103 @@
name: GitHub pages

on:
push:
branches:
- develop
push:
branches:
- develop

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 20
- uses: actions/setup-node@v4
with:
node-version: 20

- name: Install deps
run: |
npm ci --force
git submodule update --init --recursive --remote
- name: Install deps
run: |
npm ci --force
git submodule update --init --recursive --remote

- name: Semantic Release
id: semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npx semantic-release
- name: Semantic Release
id: semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npx semantic-release

- name: Build demo app
env:
RELEASE_VERSION: ${{ steps.semantic-release.outputs.new-release-version }}
run: |
echo '********'
echo "RELEASE_VERSION: $RELEASE_VERSION"
echo '********'
bash .github/workflows/scripts/replace_template.sh $RELEASE_VERSION
npm run build
- name: Build demo app
env:
RELEASE_VERSION: ${{ steps.semantic-release.outputs.new-release-version }}
run: |
echo '********'
echo "RELEASE_VERSION: $RELEASE_VERSION"
echo '********'
bash .github/workflows/scripts/replace_template.sh $RELEASE_VERSION
npm run build

- name: Deploy demo
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist/angular-loader/browser
- name: Deploy demo
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist/angular-loader/browser

outputs:
version: ${{ steps.semantic-release.outputs.new-release-version }}
outputs:
version: ${{ steps.semantic-release.outputs.new-release-version }}

slack_notification:
needs:
- build
runs-on: ubuntu-latest
steps:
- name: Post to a Slack channel
id: slack
uses: slackapi/[email protected]
with:
channel-id: 'deployments'
payload: |
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "GitHub Action build result: ${{ job.status == 'success' && ':white_check_mark:' || ':x:' }}"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Project: `${{ github.event.repository.name }}`"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Version: `${{ needs.build.outputs.version || 'TBA' }}`"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Commit/PR URL: ${{ github.event.pull_request.html_url || github.event.head_commit.url }}"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Website URL: ${{ secrets.WEBSITE_URL || 'TBA' }}"
}
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
slack_notification:
needs:
- build
runs-on: ubuntu-latest
steps:
- name: Post to a Slack channel
id: slack
uses: slackapi/[email protected]
with:
channel-id: 'deployments'
payload: |
{
"text": "GitHub Action build result: ${{ job.status == 'success' && ':white_check_mark:' || ':x:' }}",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "GitHub Action build result: ${{ job.status == 'success' && ':white_check_mark:' || ':x:' }}"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Project: `${{ github.event.repository.name }}`"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Version: `${{ needs.build.outputs.version || 'TBA' }}`"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Commit/PR URL: ${{ github.event.pull_request.html_url || github.event.head_commit.url }}"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Website URL: ${{ secrets.WEBSITE_URL || 'TBA' }}"
}
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
Loading
Loading