Skip to content

feat: Update dependencies #15

feat: Update dependencies

feat: Update dependencies #15

name: 🧪 Test and 🚀 Release
on:
push:
branches:
- main
- beta
pull_request: {}
jobs:
test-and-release:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
strategy:
matrix:
node-version: [22.x]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # pin@main
- name: ⎔ Setup node ${{ matrix.node-version }}
uses: actions/setup-node@eff380dfbcf941bf8832e4acb788cebe13dfd758 # pin@main
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- name: 🗄 Cache node_modules
id: cache-node_modules
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # pin@main
with:
path: "**/node_modules"
key: node_modules-${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
- name: 🗄 Cache .eslintcache
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # pin@main
with:
path: .eslintcache
key: eslintcache-${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
- name: 📥 Install dependencies
if: steps.cache-node_modules.outputs.cache-hit != 'true'
run: |
npm ci --ignore-scripts
- name: 🧪 Test
run: |
npm test
env:
CI: true
- name: 🚀 Release on GitHub
if: "contains(' refs/heads/main refs/heads/beta ', github.ref) && matrix.node-version == '22.x'"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
npm run release