Skip to content

Bump actions/upload-artifact from 5 to 6 #840

Bump actions/upload-artifact from 5 to 6

Bump actions/upload-artifact from 5 to 6 #840

Workflow file for this run

name: jest
permissions:
contents: read
on:
- pull_request
- push
env:
EM_CACHE_FOLDER: 'emsdk-cache'
NODE_LATEST_VERSION: '24'
jobs:
jest:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: ['20', '22', '24']
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- uses: actions/cache@v5
with:
path: ${{ env.EM_CACHE_FOLDER }}
key: jest-em-cache-${{ runner.os }}-${{ matrix.node-version }}
- uses: pyodide/setup-emsdk@v15
with:
actions-cache-folder: ${{ env.EM_CACHE_FOLDER }}
- name: dependencies
run: npm ci
- name: jest
run: npm run all
npm:
runs-on: ubuntu-latest
needs: jest
if: "github.event_name == 'push' && startsWith(github.ref, 'refs/tags')"
environment:
name: npm
url: https://www.npmjs.com/package/atsds
permissions:
id-token: write
steps:
- uses: actions/checkout@v6
- name: recovery tag information
run: git fetch --tags --force
- uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_LATEST_VERSION }}
cache: 'npm'
- uses: actions/cache@v5
with:
path: ${{ env.EM_CACHE_FOLDER }}
key: jest-em-cache-${{ runner.os }}-${{ env.NODE_LATEST_VERSION }}
- uses: pyodide/setup-emsdk@v15
with:
actions-cache-folder: ${{ env.EM_CACHE_FOLDER }}
- name: version
run: npm version from-git --no-git-tag-version
- name: extract tag
run: |
GIT_TAG=${GITHUB_REF#refs/tags/}
TAG=$(echo $GIT_TAG | sed -E 's/^v//' | sed -E 's/[0-9\.-]//g' | sed -E 's/^$/latest/g')
echo TAG=$TAG >> $GITHUB_ENV
- name: dependencies
run: npm ci
- name: build
run: npm run build
- name: publish
run: npm publish --tag $TAG