Bump vitest from 2.1.1 to 2.1.9 #93
Workflow file for this run
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
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 | |
path: lib | |
- name: Upload build artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dist | |
path: 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') | |
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 | |
path: lib | |
- name: Download build artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: dist | |
path: dist | |
- name: Increment version | |
run: yarn inc-version | |
- name: npm-publish | |
uses: JS-DevTools/npm-publish@v3 | |
with: | |
token: ${{ secrets.NPM_TOKEN }} | |
provenance: true | |
# - run: npm install -g npm | |
# - run: npm ci | |
# - run: npm publish --provenance --access public | |
# env: | |
# NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
# - run: yarn npm publish --access public | |
# env: | |
# YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Set env $VERSION_TAG | |
run: echo "VERSION_TAG=$(yarn get-version)" >> $GITHUB_ENV | |
- name: Set the tag to v$VERSION_TAG | |
run: git tag v$VERSION_TAG | |
- name: Commit | |
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 |