Skip to content

We need scripts for optipng to work #328

We need scripts for optipng to work

We need scripts for optipng to work #328

Workflow file for this run

name: CI
on: [push]
jobs:
build-and-test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Build
run: |
yarn workspace ani-cursor build
yarn workspace webamp build
yarn workspace webamp build-library
- name: Lint
run: |
yarn lint
yarn workspace webamp type-check
- name: Run Unit Tests
run: |
touch packages/skin-database/config.js
yarn test
yarn workspace webamp test
- name: Run Integration Tests
run: yarn workspace webamp integration-tests
env:
CI: true
- name: Upload Screenshot Diffs
if: failure()
uses: actions/upload-artifact@v4
with:
name: image_diffs
path: packages/webamp/js/__tests__/__image_snapshots__/__diff_output__/
- name: Generate New Screenshots
if: failure()
run: |
yarn workspace webamp integration-tests -u
- name: Upload New Screenshots
if: failure()
uses: actions/upload-artifact@v4
with:
name: new_images
path: packages/webamp/js/__tests__/__image_snapshots__/
main-release:
name: Publish to NPM
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.repository == 'captbaritone/webamp'
needs: [build-and-test]
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 20.x
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build latest (master) version
if: github.ref == 'refs/heads/master'
run: |
yarn workspace webamp build-library
echo "Setting version to 0.0.0-next-${{ github.sha }}"
npm version -w webamp 0.0.0-next-${{ github.sha }} --no-git-tag-version
env:
RELEASE_COMMIT_SHA: ${{ github.sha }}
- name: Build release version
if: github.ref_type == 'tag' && startsWith(github.ref_name, 'v')
run: exit 1 # TODO: Script to update version number in webampLazy.tsx
- name: Publish to npm
if: github.ref == 'refs/heads/master' || github.ref_type == 'tag' && startsWith(github.ref_name, 'v')
run: |
npm publish webamp ${TAG}
env:
TAG: ${{ github.ref == 'refs/heads/master' && '--tag=next' || ''}}
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}