Skip to content

v4.2.0

v4.2.0 #52

Workflow file for this run

name: Release
on:
push:
tags:
- "v*"
workflow_dispatch:
jobs:
release:
name: Build and release
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ github.token }}
steps:
- name: Install optipng
run: sudo apt-get install -y optipng
- name: Checkout
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Cache node modules
id: cache-node-modules
uses: actions/cache@v4
with:
path: node_modules
key: node-modules-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: npm ci
- name: Run tests
run: npm run test
- name: Build styles and sprites
run: npm run build
- name: Get version
run: 'echo "RELEASE_TAG=v$(jq -r ''.version'' package.json)" >> $GITHUB_ENV'
- name: Upload file to release
run: gh release upload $RELEASE_TAG *.gz --clobber
working-directory: release
- name: Update release
run: gh release edit $RELEASE_TAG --draft=false --latest --prerelease=false