chore(main): release 3.0.0 #23
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: Generate Badge | |
on: | |
push: | |
branches: [main] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout 🛎️ | |
uses: actions/checkout@v4 | |
- name: Set Node Environment | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 'lts/*' | |
cache: 'npm' | |
- name: Update npm latest | |
run: | | |
npm install -g npm@latest | |
- name: Install dependencies | |
run: npm ci | |
- name: Run Coverage test | |
run: | | |
SUMMARY="$(npm run test:coverage-ci | tail -2 | head -1)" | |
TOKENS=($SUMMARY) | |
echo "COVERAGE=$(echo ${TOKENS[2]})" >> $GITHUB_ENV | |
echo "COVERAGE_VAL=$(echo ${TOKENS[2]} | sed 's/.$//')" >> $GITHUB_ENV | |
- name: Run size-limit | |
run: | | |
SIZELIMIT="$(npx size-limit --json | grep 'size' -m 1 | sed -r 's/^[^:]*:(.*)$/\1/' | npx -y pretty-bytes-cli)" | |
echo "SIZE=$(echo ${SIZELIMIT})" >> $GITHUB_ENV | |
- name: Create the Coverage Badge | |
uses: schneegans/dynamic-badges-action@v1.7.0 | |
with: | |
auth: ${{ secrets.GIST_SECRET }} | |
gistID: 83c2a74197bb80b661019a2747e71daa | |
filename: mui-image-alter_coverage__main.json | |
label: coverage | |
message: ${{ env.COVERAGE }} | |
style: flat-square | |
maxColorRange: 90 | |
minColorRange: 50 | |
valColorRange: ${{ env.COVERAGE_VAL }} | |
namedLogo: vitest | |
- name: Create the Size Badge | |
uses: schneegans/dynamic-badges-action@v1.7.0 | |
with: | |
auth: ${{ secrets.GIST_SECRET }} | |
gistID: 83c2a74197bb80b661019a2747e71daa | |
filename: mui-image-alter_size__main.json | |
label: | |
message: ${{ env.SIZE }} | |
color: '#43a047' | |
style: flat-square |