Skip to content

Fix conflicts in merge, fix TypeScript issue #160

Fix conflicts in merge, fix TypeScript issue

Fix conflicts in merge, fix TypeScript issue #160

Workflow file for this run

name: CI/CD
on: [push, pull_request]
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'yarn'
- name: Install
run: yarn
- name: Build
run: yarn build
- name: Test
run: yarn test
- name: Code Coverage Report
uses: irongut/[email protected]
with:
filename: coverage/**/cobertura-coverage.xml
badge: true
fail_below_min: true
format: markdown
hide_branch_rate: false
hide_complexity: true
indicators: true
output: both
thresholds: '60 80'
# - name: Add Coverage PR Comment
# uses: marocchino/sticky-pull-request-comment@v2
# if: github.event_name == 'pull_request'
# with:
# recreate: true
# path: code-coverage-results.md
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: lib_core
path: packages/jewishDatesCore/lib
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: dist_core
path: packages/jewishDatesCore/dist
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: lib_picker
path: packages/reactJewishDatePicker/lib
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: dist_picker
path: packages/reactJewishDatePicker/dist
release:
runs-on: ubuntu-latest
permissions:
issues: write
contents: write
pull-requests: write
deployments: write
id-token: write
needs: [build-and-test]
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master')
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'yarn'
- name: Install
run: yarn
- name: Download build artifact
uses: actions/download-artifact@v4
with:
name: lib_core
path: packages/jewishDatesCore/lib
- name: Download build artifact
uses: actions/download-artifact@v4
with:
name: dist_core
path: packages/jewishDatesCore/dist
- name: Download build artifact
uses: actions/download-artifact@v4
with:
name: lib_picker
path: packages/reactJewishDatePicker/lib
- name: Download build artifact
uses: actions/download-artifact@v4
with:
name: dist_picker
path: packages/reactJewishDatePicker/dist
- run: yarn inc-version
- name: Set env $VERSION_TAG
run: echo "VERSION_TAG=$(yarn get-version)" >> $GITHUB_ENV
- run: git tag v$VERSION_TAG
- name: Commit version
run: |
git config --global user.name 'Shmulik-Kravitz'
git config --global user.email '[email protected]'
git commit -am v$VERSION_TAG
git push
git push origin v$VERSION_TAG
# - run: yarn npm publish --access public
- run: yarn pub
env:
YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}