Skip to content

Upgrade yarn & jewish-date #145

Upgrade yarn & jewish-date

Upgrade yarn & jewish-date #145

Workflow file for this run

name: CI/CD
on: [push, pull_request]
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'yarn'
- run: yarn
- run: yarn build
- run: yarn test
# - name: Code Coverage Report
# uses: irongut/CodeCoverageSummary@v1.3.0
# 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@v3
with:
name: lib_core
path: packages/jewishDatesCore/lib
- name: Upload build artifact
uses: actions/upload-artifact@v3
with:
name: dist_core
path: packages/jewishDatesCore/dist
- name: Upload build artifact
uses: actions/upload-artifact@v3
with:
name: lib_picker
path: packages/reactJewishDatePicker/lib
- name: Upload build artifact
uses: actions/upload-artifact@v3
with:
name: dist_picker
path: packages/reactJewishDatePicker/dist
release:
runs-on: ubuntu-latest
permissions:
issues: write
contents: write
pull-requests: write
deployments: write
needs: [build-and-test]
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master')
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'yarn'
- run: yarn
- name: Download build artifact
uses: actions/download-artifact@v3
with:
name: lib_core
path: packages/jewishDatesCore/lib
- name: Download build artifact
uses: actions/download-artifact@v3
with:
name: dist_core
path: packages/jewishDatesCore/dist
- name: Download build artifact
uses: actions/download-artifact@v3
with:
name: lib_picker
path: packages/reactJewishDatePicker/lib
- name: Download build artifact
uses: actions/download-artifact@v3
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 '29735690+Shmulik-Kravitz@users.noreply.github.com'
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 }}