[minor] update packages with added isOwnTag #197
This file contains hidden or 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
name: NodeJS with Webpack | |
permissions: write-all | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18.x' | |
registry-url: 'https://registry.npmjs.org' | |
- uses: volta-cli/action@v4 | |
- name: Install | |
run: npm ci | |
- name: Versions | |
run: | | |
node --version | |
npm --version | |
- name: Lint | |
run: npm run lint | |
- name: Build | |
run: npm run build:all | |
- name: Test jest | |
run: npm run test:cov | |
- name: Publish Jest Test Report 1 | |
uses: mikepenz/action-junit-report@v3 | |
if: success() || failure() # always run even if the previous step fails | |
with: | |
report_paths: '**/reports/jest/*.xml' | |
check_name: 'Jest Test Report Unit' | |
detailed_summary: true | |
- name: Test cy | |
run: npm run cy:run:cov | |
- name: Merge cov | |
run: npm run cov:merge | |
- name: Test jest:integration | |
run: | | |
rm -rf 'reports/jest' || true | |
npm run test:cov:int | |
- name: Merge cov | |
run: npm run cov:merge:fin | |
- name: Show coverage | |
run: npm run cov:show | |
- name: Archive code coverage results | |
uses: actions/upload-artifact@v3 | |
with: | |
name: code-coverage-report | |
path: ./reports/coverage-full-total/ | |
- name: Comment coverage | |
continue-on-error: true | |
uses: danhunsaker/[email protected] | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
clover-file: ./reports/coverage-full-total/clover.xml | |
- name: Monitor coverage | |
continue-on-error: true | |
run: npm run cov:check | |
- name: Publish Jest Test Report Integration | |
uses: mikepenz/action-junit-report@v3 | |
if: success() || failure() # always run even if the previous step fails | |
with: | |
report_paths: '**/reports/jest/*.xml' | |
check_name: 'Jest Test Report Integration' | |
detailed_summary: true | |
- name: Publish | |
if: success() | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: | | |
branch=${{ github.ref }} | |
echo "Branch: $branch" | |
gitmsg="${{ github.event.commits[0].message }}" | |
echo "Commit: $gitmsg" | |
if [[ "$gitmsg" =~ "[patch]" ]]; then | |
echo "publish patch" | |
npm run publish:patch | |
git push --tags | |
exit 0 | |
fi | |
if [[ "$gitmsg" =~ "[fix]" ]]; then | |
echo "publish patch" | |
npm run publish:patch | |
git push --tags | |
exit 0 | |
fi | |
if [[ "$gitmsg" =~ "[minor]" ]]; then | |
echo "publish minor" | |
npm run publish:minor | |
git push --tags | |
exit 0 | |
fi | |
if [[ "$gitmsg" =~ "[major]" ]]; then | |
echo "publish major" | |
npm run publish:major | |
git push --tags | |
exit 0 | |
fi | |
echo "publishing alpha, for other commit message should contain [minor], [major] or [patch]/[fix]" | |
npm run publish:alpha | |
git push --tags | |